MDL-17143 fixed use of $userid in definition_after_data() - problem in 1.8.x is that the definition_after_data() is called 2x ;-)
This commit is contained in:
+7
-7
@@ -54,15 +54,15 @@ class user_edit_form extends moodleform {
|
||||
}
|
||||
}
|
||||
|
||||
// remove description
|
||||
if (empty($user->description) && !empty($CFG->profilesforenrolledusersonly) && !record_exists('role_assignments', 'userid', $userid)) {
|
||||
if ($mform->elementExists('description')) {
|
||||
$mform->removeElement('description');
|
||||
}
|
||||
}
|
||||
|
||||
if ($user = get_record('user', 'id', $userid)) {
|
||||
|
||||
// remove description - this must be here because
|
||||
if (empty($user->description) && !empty($CFG->profilesforenrolledusersonly) && !record_exists('role_assignments', 'userid', $user->id)) {
|
||||
if ($mform->elementExists('description')) {
|
||||
$mform->removeElement('description');
|
||||
}
|
||||
}
|
||||
|
||||
// print picture
|
||||
if (!empty($CFG->gdversion)) {
|
||||
$image_el =& $mform->getElement('currentpicture');
|
||||
|
||||
Reference in New Issue
Block a user