Assign Roles to user in Manual accounts Register

Re: Assign Roles to user in Manual accounts Register

by John White -
Number of replies: 0
Hi,

Changing the code in editadvanced.php to try to enrol a new user in courses while id==-1 would give trouble, because if id = -1 you do not have a user id to put into the enrolment!

Getting rid of the email field will also give trouble.

But if you want more than one student to be allowed use the same email address, you might edit both files:
user/edit_form.php,
...to changed...
$errors['email'] = get_string('emailexists');
...to read...
// $errors['email'] = get_string('emailexists');

and,
user/editadvanced_form.php
...to changed...
$err['email'] = get_string('emailexists');
...to read...
// $err['email'] = get_string('emailexists');

...so that no action is taken when two email addresses are the same.

Regards,

John