Page 1 of 1

Login Assistant Component - Question

Posted: 05 Jul 2015, 16:58
by Sfulk
Hey Everyone,

I've been using the Login Assistant Component for a while but I am starting to have problems with other features because of name case. I do not want to use the standard useCaseSensitiveNameChecks because some people may register a long name with capitlization on some letters and not others which may prove more difficult to remember.

I want to allow the user to type in their user name without case being an issue and have it log them in with the exact case of the username in the database. Just to clarify: If I log in with "TEST", "TeST", "test" or any variation the users name should login as whatever case it is in the database "Test".

Is there a simple way to do this?

Thanks,
Scott

Re: Login Assistant Component - Question

Posted: 06 Jul 2015, 08:47
by Lapo
Hi,
I've been using the Login Assistant Component for a while but I am starting to have problems with other features because of name case. I do not want to use the standard useCaseSensitiveNameChecks because some people may register a long name with capitlization on some letters and not others which may prove more difficult to remember


But the useCaseSensitiveNameChecks flag is not for registering. Are we talking about the Login Assistant or something else?

thanks

Re: Login Assistant Component - Question

Posted: 06 Jul 2015, 16:20
by Sfulk
Hey Lapo,
I think you are misunderstanding me, registration is handled separately from the client. I use login assistant component to log users in, when a user logs in it does not log them in with the same case as what is stored in the database it logs them in however they typed it in the client as long as the letters/numbers are the same.

I want the users name in the client to be the exact case they registered with not how they typed in this time. I do not want to use case sensitive name checks because then that forces the user to remember or write down their user name in exact case. Its not a password so I do not want to handle it this way.

This is my situation; I login to the client with the username "Scott" and create a room and place furniture items. Then later I login as "scott" and I can no longer pick up, move or place items to the room. I could get around this by using equalsIgnoreCase(); when I check the room owners name against the players name, but I would like to keep the users name in the same format as the name stored in the database.

Thanks,
Scott

Re: Login Assistant Component - Question

Posted: 06 Jul 2015, 16:47
by Lapo
Thanks for the clarification.
You should use the LoginConfiguration.nickNameField property.

Typically this is used when you have your clients logging in with an email address (or something other than their name) but you don't want it to show as the user name,

In your case it will work as a duplicate of the userName field. The former will be used to check the credentials and the latter to assign the correct username to the player.

Makes sense?

Re: Login Assistant Component - Question

Posted: 06 Jul 2015, 17:51
by Sfulk
Awesome! Thanks for the help Lapo!

Edit: Just updated extension, it works perfectly. :D

Re: Login Assistant Component - Question

Posted: 07 Jul 2015, 08:31
by Lapo
Great! :)