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:
skodak
2008-11-18 21:43:34 +00:00
parent f3b83353e7
commit 63e73da77b
-7
View File
@@ -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');