Login Assistant Component - Question

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Sfulk
Posts: 54
Joined: 06 Jul 2012, 17:02

Login Assistant Component - Question

Postby Sfulk » 05 Jul 2015, 16:58

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
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Login Assistant Component - Question

Postby Lapo » 06 Jul 2015, 08:47

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
Lapo
--
gotoAndPlay()
...addicted to flash games
Sfulk
Posts: 54
Joined: 06 Jul 2012, 17:02

Re: Login Assistant Component - Question

Postby Sfulk » 06 Jul 2015, 16:20

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
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Login Assistant Component - Question

Postby Lapo » 06 Jul 2015, 16:47

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?
Lapo

--

gotoAndPlay()

...addicted to flash games
Sfulk
Posts: 54
Joined: 06 Jul 2012, 17:02

Re: Login Assistant Component - Question

Postby Sfulk » 06 Jul 2015, 17:51

Awesome! Thanks for the help Lapo!

Edit: Just updated extension, it works perfectly. :D
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Login Assistant Component - Question

Postby Lapo » 07 Jul 2015, 08:31

Great! :)
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 16 guests