]> git.mjollnir.org Git - moodle.git/commitdiff
Locked fields do not need to be required.
authorikawhero <ikawhero>
Fri, 5 Jan 2007 06:54:26 +0000 (06:54 +0000)
committerikawhero <ikawhero>
Fri, 5 Jan 2007 06:54:26 +0000 (06:54 +0000)
user/profile/lib.php

index e76f32e8c08b78fdc04cca9cdad628128dfd94df..449be9dacb5a7d5528f093771359cc9ad17e5717 100644 (file)
@@ -156,7 +156,7 @@ class profile_field_base {
      * @param   object   instance of the moodleform class
      */
     function display_field_required(&$form) {
-        if ($this->_is_required()) {
+        if ( $this->_is_required() and !$this->_is_locked() ) {
             $form->addRule($this->fieldname, get_string('required'), 'required', null, 'client');
         }
     }