How to change the moodle forgot password page?

481 Views Asked by At

I want to change the page that has you either type in your email or username. Then from there, if it matches with an account it will send you a password reset email. I want to also change the text in that email. I want to get rid of the option of putting in your username and only have the email as an option.

I have looked through the site administration menu and haven't found anything. I was wondering if I need to look into the theme code or is it somewhere else?

1

There are 1 best solutions below

0
On

I want to change the page that has you either type in your email or username

If you want a different reset password page, then you can change the url via

Site admin > Plugins > Authentication > Manage authentication >

Forgotten password URL - forgottenpasswordurl

I want to get rid of the option of putting in your username and only have the email as an option.

Option 1 - code a different page using the url above. copy the code from

  • /login/forgot_password.php
  • /login/forgot_password_form.php

Option 2 - add some custom css to hide the username text box via

Site admin > Appearance > [Theme name] >

Additional theme preset files - presetfiles

I'm not sure what css to use though, maybe something like

#page-login-forgot_password #id_searchbyusername {display: none;}

Don't forget to save to apply the changes

I want to also change the text in that email

Site admin > General > Language > Language customisation > [choose language] > Open

Then search for the language string

Component = Moodle

String id = emailresetconfirmation

Make your changes and save