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:
+1
-1
@@ -4311,7 +4311,7 @@ class admin_setting_users_with_capability extends admin_setting_configmultiselec
|
||||
'This is unexpected, and a problem because there is no way to pass these ' .
|
||||
'parameters to get_users_by_capability. See MDL-34657.');
|
||||
}
|
||||
$userfieldsapi = \core\user_fields::for_name();
|
||||
$userfieldsapi = \core_user\fields::for_name();
|
||||
$userfields = 'u.id, u.username, ' . $userfieldsapi->get_sql('u', false, '', '', false)->selects;
|
||||
$users = get_users_by_capability(context_system::instance(), $this->capability, $userfields, $sort);
|
||||
$this->choices = array(
|
||||
|
||||
Reference in New Issue
Block a user