MDL-17143 fixed undefined $userid

This commit is contained in:
skodak
2008-11-18 20:56:20 +00:00
parent 0e3cf9d774
commit 3af8b37abe
+1 -1
View File
@@ -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