Permalink
Browse files

MDL-17143 description now is mandatory again for normal (enroled) use…

…rs. Previous commit broke that.
  • Loading branch information...
1 parent 86b4781 commit 0e3cf9d774d07e1296e6bfd4dc2293da7090ac71 stronk7 committed Nov 18, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 user/edit.php
View
@@ -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))

0 comments on commit 0e3cf9d

Please sign in to comment.