From 0e3cf9d774d07e1296e6bfd4dc2293da7090ac71 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 18 Nov 2008 16:32:40 +0000 Subject: [PATCH] MDL-17143 description now is mandatory again for normal (enroled) users. Previous commit broke that. --- user/edit.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/user/edit.php b/user/edit.php index 8f98ab2bd0f..1f3590ec642 100644 --- a/user/edit.php +++ b/user/edit.php @@ -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))