Skip to content
Browse files

MDL-17143 fixed undefined $userid

  • Loading branch information...
1 parent 0e3cf9d commit 3af8b37abe0257fcfe5349e4201171d05abfded1 skodak committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 user/edit.php
View
2 user/edit.php
@@ -428,7 +428,7 @@ function find_form_errors(&$user, &$usernew, &$err, &$um) {
$err['email'] = get_string('toomanybounces');
if (empty($usernew->description) and !isadmin()) {
- if (!empty($CFG->profilesforenrolledusersonly) && !record_exists('user_students', 'userid', $userid) && !record_exists('user_teachers', 'userid', $userid)) {
+ if (!empty($CFG->profilesforenrolledusersonly) && !record_exists('user_students', 'userid', $user->id) && !record_exists('user_teachers', 'userid', $user->id)) {
///Prevent mandatory description validation, user hasn't been able to introduce his description
} else {
$err["description"] = get_string("missingdescription"); ///Normal description enforcement

0 comments on commit 3af8b37

Please sign in to comment.
Something went wrong with that request. Please try again.