2 users, 1 email account

Re: 2 users, 1 email account

by Ferry van der Vorst -
Number of replies: 1

HI.

 

ANother file would be worthwhile amending: login/forgot_password_form.php.
 
This is the forgot password box, which allows the user to reset their password by username or email address as default. Since the password is no longer unique, searching by email will not work as it will return multiple users when passwords can be dupllicates.
 
So to perform this:
- open users/forgot_password_form.php in the moodle installation folder
- comment out the following lines  in the file (around line 53):
 
        $mform->addElement('header', 'searchbyemail', get_string('searchbyemail'), '');
        $mform->addElement('text', 'email', get_string('email'));
        $mform->setType('email', PARAM_RAW);
        $submitlabel = get_string('search');
        $mform->addElement('submit', 'submitbuttonemail', $submitlabel);
 
This will remove the submit by email form fields on the forgot password screen.
Average of ratings: Useful (1)
In reply to Ferry van der Vorst

Re: 2 users, 1 email account

by Sandeep Kankatala -

Thanks Ferry. It works. I did this on Moodle 2.6.3.

The file forgot_password_form.php is located in login/forgot_password_form.php