MDL-24285 fixed invalid password check
authorPetr Skoda <skodak@moodle.org>
Sun, 19 Sep 2010 16:10:18 +0000 (16:10 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 19 Sep 2010 16:10:18 +0000 (16:10 +0000)
enrol/self/edit_form.php

index 307b50b..3141f5e 100644 (file)
@@ -135,7 +135,7 @@ class enrol_self_edit_form extends moodleform {
         if ($checkpassword) {
             $require = $plugin->get_config('requirepassword');
             $policy  = $plugin->get_config('usepasswordpolicy');
-            if ($require and trim($data['password'])) {
+            if ($require and trim($data['password']) === '') {
                 $errors['password'] = get_string('required');
             } else if ($policy) {
                 $errmsg = '';//prevent eclipse warning