0

I want to keep the registration process as simple as possible for my users, like a lot of modern websites do. I want there to be only 3 fields to fill out when creating new accounts: Email, Password, Repeat password.

It seems to me there is no option to remove the mandatory username field from the registration form though, is there any workaround?

1
  • 2
    I've seen hacky techniques like using js to populate the (hidden) Repeat Password field with the Password value. Would you be happy to populate a hidden Username field with the Email field value? – mickmackusa Sep 11 '20 at 22:11
0

I went through the trouble to do this once, and learned that it wasn't worth it. Not that it was too hard - I did it, but it required constant maintenance.

First, when a user registers, you must alter the login form to remove the username field, and when the registration form is submitted, you must INSERT a username, which where it starts getting difficult. The way I did it, was to give it a temporary name and then change the name when the user ID is known.

Then you must override the output of your login modules, the output of the reset password form, the login view of the component, the user account default and edit views....

And when Joomla releases an update that changes any of these things - you get to rewrite the overrides.

Maybe instead, you might consider giving them a "generate username" option....make it fun, or base it on their name, or whatever.

It isn't worth it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.