Jump to content
  • 0

username & player name does not distinguish between uppercase and lowercase


Question

9 answers to this question

Recommended Posts

  • 1
  • 0
Posted
1 hour ago, Cheshire said:

it's like this?

public static bool UserExists(string nameOrEmail)
{

       if (nameOrEmail == ??)

           {

                return false;

           }

}

  • 0
Posted

In code you'll likely want to have hashes of names if you want them to be case sensitive and compare those instead of the actual names. 

 

Otherwise at the database level you'd have to figure out how to make the fields case sensitive. 

  • 0
Posted
9 minutes ago, Scaly said:

You can probable store in a DB all character names in upper and compare to that

 

Unfortunately not because the database layer is case insensitive. 

  • 0
Posted
5 hours ago, Cheshire said:

In code you'll likely want to have hashes of names if you want them to be case sensitive and compare those instead of the actual names. 

 

Otherwise at the database level you'd have to figure out how to make the fields case sensitive. 

If the character is uppercase, the server will return an error.  i don't want the player to put username and ingame name in uppercase

  • 0
Posted

That's not the information I gathered from the first post at all and quite different.

 

Could you provide a clear example of what you want before any more miscommunication happens? I think something is getting lost in translation here. 

  • 0
Posted
On 8/28/2021 at 11:08 AM, Cheshire said:

That's not the information I gathered from the first post at all and quite different.

 

Could you provide a clear example of what you want before any more miscommunication happens? I think something is getting lost in translation here. 

When user signup whit user name “IloveYou” and character name “Warriors”

Server auto change “IloveYou” to “iloveyou” and “Warriors” to “warrios”

Using ToLower()

which file .cs for this feature?

  • 0
Posted

tks. I did it
if (Name.Any(char.IsUpper))
            {                                
                Name = Name.ToLower() + "" + Id;
            }

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...