Permalink
Browse files

Locked fields do not need to be required.

  • Loading branch information...
ikawhero
ikawhero committed Jan 5, 2007
1 parent b07b6c8 commit 901d26dbf4e45c74b415e76450f08b3f000efed2
Showing with 1 addition and 1 deletion.
  1. +1 −1 user/profile/lib.php
View
@@ -156,7 +156,7 @@ function display_field_default(&$form) {
* @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');
}
}

0 comments on commit 901d26d

Please sign in to comment.