* use role_get_name() or role_fix_names() if you need any role names, using role.name
directly from database is not correct any more
+optional - no changes needed:
+* add support for custom user signup form - see auth_plugin_base::signup_form() function
=== 2.2 ===
//override when can signup
print_error('mustbeoveride', 'debug', '', 'user_signup()' );
}
+
+ /**
+ * Return a form to capture user details for account creation.
+ * This is used in /login/signup.php.
+ * @return moodle_form A form which edits a record from the user table.
+ */
+ function signup_form() {
+ global $CFG;
+
+ require_once($CFG->dirroot.'/login/signup_form.php');
+ return new login_signup_form(null, null, 'post', '', array('autocomplete'=>'on'));
+ }
/**
* Returns true if plugin allows confirming of new users.
*/
require('../config.php');
-require_once('signup_form.php');
-
if (empty($CFG->registerauth)) {
print_error('notlocalisederrormessage', 'error', '', 'Sorry, you may not use this page.');
$PAGE->set_url('/login/signup.php');
$PAGE->set_context(context_system::instance());
-$mform_signup = new login_signup_form(null, null, 'post', '', array('autocomplete'=>'on'));
+$mform_signup = $authplugin->signup_form();
if ($mform_signup->is_cancelled()) {
redirect(get_login_url());