Serverside getUserByName ignoring case

Post here your suggestions for new possible features in SmartFoxServer.

Moderators: Lapo, Bax

Post Reply
turtlesoup
Posts: 77
Joined: 28 Dec 2007, 20:56

Serverside getUserByName ignoring case

Post by turtlesoup »

Hey,

can you add a getUserByName method parameter to ignore upper/lower case of the name? Would be very helpful.

Thanks!
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

I'm looking for something like this too.

I created a custom private message, where the user can type in

\pm [name] message

the [name] parameter is sent to the server, then I check if that user is online by zone.getUserByName(name).

players may type in a name incorrectly, i.e. JacK instead of Jack.

So, if Jack was actually online. The user sent a message to JacK, he will receive a response saying "sorry, user doesn't exist or is offline".
Smartfox's forum is my daily newspaper.
Flappi282
Posts: 158
Joined: 20 May 2009, 17:51
Contact:

Post by Flappi282 »

The problem with this is hard to explain:
Eg. User say Lapo logs on
Someone wants the name of Lapo, but it is taken, so they use lapo or LAPO.
You could build a login extension which changes the username to lowercase, and Bigfish, you could add to your extension, making all usernames lower case.
You could do this using aString = aString.toLowerCase()
Post Reply