MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API (core_user) instead of within the 'core' API, since it is directly related to user data. Since the class has only just been added to Moodle, now is a good time to move it.
This commit is contained in:
+2
-2
@@ -480,7 +480,7 @@ function useredit_get_enabled_name_fields() {
|
||||
global $CFG;
|
||||
|
||||
// Get all of the other name fields which are not ranked as necessary.
|
||||
$additionalusernamefields = array_diff(\core\user_fields::get_name_fields(), array('firstname', 'lastname'));
|
||||
$additionalusernamefields = array_diff(\core_user\fields::get_name_fields(), array('firstname', 'lastname'));
|
||||
// Find out which additional name fields are actually being used from the fullnamedisplay setting.
|
||||
$enabledadditionalusernames = array();
|
||||
foreach ($additionalusernamefields as $enabledname) {
|
||||
@@ -507,7 +507,7 @@ function useredit_get_disabled_name_fields($enabledadditionalusernames = null) {
|
||||
}
|
||||
|
||||
// These are the additional fields that are not currently enabled.
|
||||
$nonusednamefields = array_diff(\core\user_fields::get_name_fields(),
|
||||
$nonusednamefields = array_diff(\core_user\fields::get_name_fields(),
|
||||
array_merge(array('firstname', 'lastname'), $enabledadditionalusernames));
|
||||
|
||||
// It may not be significant anywhere, but for compatibility, this used to return an array
|
||||
|
||||
Reference in New Issue
Block a user