Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: ExSpirit on February 10, 2021, 01:10:09 PM

Title: Log-in with email
Post by: ExSpirit on February 10, 2021, 01:10:09 PM
Is there any setting to log-in with email not with username?
Title: Re: Log-in with email
Post by: Kindred on February 10, 2021, 01:12:50 PM
no setting needed.  SMF accepts username OR email, always
Title: Re: Log-in with email
Post by: ExSpirit on February 10, 2021, 01:37:11 PM
What about to disable username entry, is that possible?

When user registers on forum username becomes his shown name, so I would like to disable username and allow him to set shown name instead of username at registration page.
Title: Re: Log-in with email
Post by: Kindred on February 10, 2021, 03:09:31 PM
no.... it is not possible to disable username without recoding things.


this mod will allow them to set their display name on registration
https://custom.simplemachines.org/mods/index.php?mod=1747
Title: Re: Log-in with email
Post by: ExSpirit on February 10, 2021, 04:15:07 PM
Thanks, I'll try this mod. Just need to hide the username field, but I'm not sure where to than change that email is used as username field when data is written to database?
Title: Re: Log-in with email
Post by: Kindred on February 10, 2021, 04:24:21 PM
please do not hide the username field.  The username is required for ALOT of things in the system. It should be used -- and it can not be changed once the user is registered.

The DISPLAY NAME will be used in all cases of public view -- and can be changed.


Install that mod. (you will probably have to emulate version 2.0 RC2 to get it to install)
then the user will be asked for the login name (aka username) and their display name (aka realname) on registration...  and they will not have the username = displayname, unless they want it to be so.
Title: Re: Log-in with email
Post by: Illori on February 10, 2021, 05:29:46 PM
Quote from: Kindred on February 10, 2021, 04:24:21 PM
please do not hide the username field.  The username is required for ALOT of things in the system. It should be used -- and it can not be changed once the user is registered.

the username can be changed, but only by admin.
Title: Re: Log-in with email
Post by: ExSpirit on February 11, 2021, 01:46:24 AM
Why not hdding username field if than I still use username but just place email as value of that field? Is it seen anywhere? Or what would be the problem in that case?
Title: Re: Log-in with email
Post by: Kindred on February 11, 2021, 09:04:02 AM
having a login username different from email is a better practice...

As for hiding it...   the only people who SEE it are the admin and that user.
UNLESS an account is deleted, in which case, the username becomes the visible name when viewing posts by a deleted account.

Seriously, your BEST option is just to ask the users to add a "display name" when they register.   That way, you're not messing with things that become complicated if you make even a minor mistake.
Title: Re: Log-in with email
Post by: Aleksi "Lex" Kilpinen on February 11, 2021, 09:13:44 AM
To be perfectly honest, I'd prefer to see it possible to easily disable login by email completely, and force the use of a separate (from both display name and email) username that's filtered to not accept e-mail addresses.
I can't think of a good reason to force e-mail logins.
Title: Re: Log-in with email
Post by: vbgamer45 on February 11, 2021, 09:16:27 AM
Could be a good mod idea disable login by email, or only allow login by email.
Title: Re: Log-in with email
Post by: Aleksi "Lex" Kilpinen on February 11, 2021, 09:28:10 AM
Definitely, could see use for something like that.
Title: Re: Log-in with email
Post by: ExSpirit on February 12, 2021, 03:29:30 AM
Yeah true.

The only reason why I don't want to add Username is because of extra fields at registration - some people hate that and I wanna make it as simple as it can be (if he has to write username + name + email... it's a lot of data for no reason, especially username/email - why would we need both, when only email would be enough).
Title: Re: Log-in with email
Post by: Kindred on February 12, 2021, 12:52:31 PM
because the SMF system is not designed that way and doing what you suggest has a large potential for screwing up core functionality.

I don't think that people get upset over entering a username, display name and email.... and I am one of the first people to complain about UX issues.