MDL-17143 description now is mandatory again for normal (enroled) users. Previous commit broke that.

This commit is contained in:
stronk7
2008-11-18 16:32:40 +00:00
parent 86b4781cb4
commit 0e3cf9d774
+5 -1
View File
@@ -428,7 +428,11 @@ function find_form_errors(&$user, &$usernew, &$err, &$um) {
$err['email'] = get_string('toomanybounces');
if (empty($usernew->description) and !isadmin()) {
//$err["description"] = get_string("missingdescription");
if (!empty($CFG->profilesforenrolledusersonly) && !record_exists('user_students', 'userid', $userid) && !record_exists('user_teachers', 'userid', $userid)) {
///Prevent mandatory description validation, user hasn't been able to introduce his description
} else {
$err["description"] = get_string("missingdescription"); ///Normal description enforcement
}
}
if (empty($usernew->city))