Replace username with email

Replace username with email

by Ivan Alamo -
Number of replies: 4

hi! I am trying to get the username replaced by the email, that way we don't use the username. Is there any way to do it?

Average of ratings: -
In reply to Ivan Alamo

Re: Replace username with email

by Jon Bolton -
Picture of Testers
Yes - in Site administration > Plugins > Authentication > Manage authentication, you can tick the box for “Allow login via email” - see https://docs.moodle.org/38/en/Managing_authentication#Allow_login_via_email

When I’m uploading users manually, I then set their username as their email address.

With Self-registration, they’ll have to enter their email address 3 tines: once as their username, again as their email address, and once more to confirm the email address. There’s no easy way around that though.

If you want to tidy things up properly...

You can then edit your language strings to change
“Username/email” to “Email address” and
“Remember username” to “Remember email address”

And you can tidy things up on the forgotten password page using a combination of language string changes and css.

See, eg, https://training.scottishmotorsportsclubs.co.uk/login/index.php and https://training.scottishmotorsportsclubs.co.uk/login/forgot_password.php
In reply to Jon Bolton

Re: Replace username with email

by Ivan Alamo -

Thank you very much for your comprehensive response! It hadn't occurred to me to use language customization for this but it seems like a good solution. Thank you.