MDL-58220 oauth2: Use the same list of user fields
Authentication has a hard coded list of valid internal user fields - but they are in a class variable. We need them in oauth user_field_mapping so we need to move them to a central place and call them from oauth2 and auth.
This commit is contained in:
+1
-20
@@ -102,26 +102,7 @@ class auth_plugin_base {
|
||||
* The fields we can lock and update from/to external authentication backends
|
||||
* @var array
|
||||
*/
|
||||
var $userfields = array(
|
||||
'firstname',
|
||||
'lastname',
|
||||
'email',
|
||||
'city',
|
||||
'country',
|
||||
'lang',
|
||||
'description',
|
||||
'url',
|
||||
'idnumber',
|
||||
'institution',
|
||||
'department',
|
||||
'phone1',
|
||||
'phone2',
|
||||
'address',
|
||||
'firstnamephonetic',
|
||||
'lastnamephonetic',
|
||||
'middlename',
|
||||
'alternatename'
|
||||
);
|
||||
var $userfields = \core_user::AUTHSYNCFIELDS;
|
||||
|
||||
/**
|
||||
* Moodle custom fields to sync with.
|
||||
|
||||
Reference in New Issue
Block a user