$form->addElement('selectyesno', 'locked', get_string('profilelocked', 'admin'));
+ $form->addElement('selectyesno', 'forceunique', get_string('profileforceunique', 'admin'));
+
+ $form->addElement('selectyesno', 'signup', get_string('profilesignup', 'admin'));
+
$choices = array();
$choices[PROFILE_VISIBLE_NONE] = get_string('profilevisiblenone', 'admin');
$choices[PROFILE_VISIBLE_PRIVATE] = get_string('profilevisibleprivate', 'admin');
}
}
-?>
\ No newline at end of file
+?>
return (boolean)$this->field->locked;
}
+ /**
+ * Check if the field data should be unique
+ * @return boolean
+ */
+ function is_unique() {
+ return (boolean)$tihs->field->forceunique;
+ }
+
+ /**
+ * Check if the field should appear on the signup page
+ * @return boolean
+ */
+ function is_signup_field() {
+ return (boolean)$this->field->signup;
+ }
+
+
} /// End of class definition