Multiple username

0
Hi reader,   I have created an authentication mechanism using anonymous users. I want to use more than one username (username and email). How can I achieve this?    
asked
3 answers
5

Hi, 

 

First of all, you have to check your Username Field with RegEx. If the Condition is True then consider it a mail id, you have to log in with your registered Email id. Or else if the condition is false then try with your registered username.

isMatch($Entity/attribute,$RegEx) Please use this condition for your ref.

 

Thanks.

 

answered
2

Hi Harshraj,

May be just try to add one email entity separately and add the 1-* association in between this account and email entities there you can store many emails for one account but for sure multiple usernames you can't add I hope so.

answered
0

Hi, if i understand you well you want the user to be able to sign in with either his username or his email?
You could after the signin button first check if there is a user with the given username by the user, if no account exists with that username, you could check for an account with that email address. If an account exists with that email address, you can pass the username of that account to the sign in action in a nanoflow.
This can be done with any attribute of the user/account entity, but make sure to keep such an attribute unique for each user.

answered