mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
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:
parent
4a762cb514
commit
da7fac00ea
1 changed files with 7 additions and 7 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue