MDL-17143 $CFG->profilesforenrolledusersonly does not belong into advanced user edit form - it was removing description if user had only create user cap
This commit is contained in:
@@ -76,13 +76,6 @@ class user_editadvanced_form extends moodleform {
|
||||
}
|
||||
}
|
||||
|
||||
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
$can_edit_user = has_capability('moodle/user:update', $sitecontext);
|
||||
// remove description
|
||||
if (empty($user->description) && !empty($CFG->profilesforenrolledusersonly) && !$can_edit_user && !record_exists('role_assignments', 'userid', $userid)) {
|
||||
$mform->removeElement('description');
|
||||
}
|
||||
|
||||
// user can not change own auth method
|
||||
if ($userid == $USER->id) {
|
||||
$mform->hardFreeze('auth');
|
||||
|
||||
Reference in New Issue
Block a user