Permalink
Browse files

user/edit_form MDL-20683 - allow user to edit description if set with

$CFG->profilesforenrolledusersonly

The original intention seems to be to allow the user to edit the description
if its not empty, however it was not ever allowing that to happen. This was
already correct in HEAD.
  • Loading branch information...
1 parent 131065d commit ed5a88a715c161906688867347aa207d0e8cfd42 @danpoltawski danpoltawski committed Feb 24, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 user/edit_form.php
View
@@ -63,12 +63,12 @@ function definition_after_data() {
}
}
- // remove description
- if (empty($user->description) && !empty($CFG->profilesforenrolledusersonly) && !record_exists('role_assignments', 'userid', $userid)) {
- $mform->removeElement('description');
- }
if ($user = get_record('user', 'id', $userid)) {
+ // remove description
+ if (empty($user->description) && !empty($CFG->profilesforenrolledusersonly) && !record_exists('role_assignments', 'userid', $userid)) {
+ $mform->removeElement('description');
+ }
// print picture
if (!empty($CFG->gdversion)) {

0 comments on commit ed5a88a

Please sign in to comment.