mirror of
https://github.com/moodle/moodle.git
synced 2025-03-23 00:50:15 +01:00
Merge branch 'MDL-78009-401' of https://github.com/marinaglancy/moodle into MOODLE_401_STABLE
This commit is contained in:
commit
4fa9ed7956
@ -43,6 +43,8 @@ class user_field_mapping extends persistent {
|
||||
* @return array
|
||||
*/
|
||||
private static function get_user_fields() {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/user/profile/lib.php');
|
||||
return array_merge(\core_user::AUTHSYNCFIELDS, ['picture', 'username'], get_profile_field_names());
|
||||
}
|
||||
|
||||
@ -72,6 +74,8 @@ class user_field_mapping extends persistent {
|
||||
* @return array
|
||||
*/
|
||||
public function get_internalfield_list() {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/user/profile/lib.php');
|
||||
$userfields = array_merge(\core_user::AUTHSYNCFIELDS, ['picture', 'username']);
|
||||
$internalfields = array_combine($userfields, $userfields);
|
||||
return array_merge(['' => $internalfields], get_profile_field_list());
|
||||
|
Loading…
x
Reference in New Issue
Block a user