Jump to content

User Name Case


Jed69

This topic is 5695 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Is it possible to make a log on User Name Case Sensitive.

Not really. Account names must be unique, but are not case sensitive. I tend to treat them as if they were however. Passwords are case sensitive, but need not be unique. I also tend to treat them as if they were.

What are you trying to accomplish with making the Account names case sensitive? There may be several other ways to achieve specific objectives.

Steven

Link to comment
Share on other sites

Basically in a few occasions in the database I use the Get(AccountName) function to populate a couple of fields. The usernames are always the First Name and Last Name of the user and I have trained them that they must put these in with a capital at the start of each name. I was just wondering if there was a way to make sure this happened.

Link to comment
Share on other sites

I use the Get(AccountName) function to populate a couple of fields.

Sure. Use the Proper() function to reset the name. This can result is some issues however for some names such a McSniff being turned into Mcsniff though. If you're using the Account Name as part of a record level access test this can result in access' being denied in some circumstances depending on the specific RLA test calculation you employ.

Steven

Link to comment
Share on other sites

You could put a If[] test in your opening script:

Let([

account = Get(AccountName);

first = Left(LeftWords(account;1);1);

last = Left(RightWords(account;1);1);

result = Filter (first ; Lower(first)) & Filter(last; Lower(last));

result = not IsEmpty(result)

];

result

)

If true, then show error message and ask them to re-login.

Link to comment
Share on other sites

Jed--

I think Stephen's points should be taken and considered:

First, and most importantly, what are you trying to accomplish? Why is the capitalization so important?

Second, Stephen's point about McSniff cannot be finessed (sorry DJ), and maybe (probably?) doesn't have to be.

Here's why I say that: Given that account names must be unique AND that accounts are not case sensitive, the capitalization of an account name should be immaterial in your field. What I mean is this: if I enter SUNFISH62 or SunFish62 at the login prompt won't matter. Presumably, I will be the only one with that login, and therefore the only one with that AccountName. So the capitalization shouldn't matter.

I am not at a FM machine right now, but the implication is that regardless of user input, FM uses ONE form for the account name, and I imagine Get(AccountName) retrieves the same string regardless of user input at the login prompt. I would run a quick test to see whether it's true, because I imagine I am wrong on this.

Finally, given that the AccountName string must be unique for each account, you could simply populate the field with Lower(Get(AccountName)) and be certain it will always be the same for a given account. It might not look all that spectacular, but maybe it doesn't have to be.

If you REALLY have to have a particular look, then maybe you create an AccountNames table that stores the account name along with a canonical form of that Account's name for use in display situations. That is the only reliable way I can imagine to ensure that SuNFisH62 is always converted to Dude Tuthankamen. Of course, this table is for display uses only, and shouldn't include any passwords.

HTH,

David

Link to comment
Share on other sites

Whatever capitalization scheme the user enters for the account name is what is returned by Get(AccountName) regardless of how it is capitalized in Accounts and Privileges.

The OP uses Get(AccountName) to fill in fields, like an auto-entered Created By that will display. It's possible someone may enter "TOm JoNeS" as their account name, but unlikely. "Tom Jones and "tom jones" are much more likely. The OP wants to make sure they're using the former, presumably so his fields look nice and pretty.

A table with properly capitalized account names is probably the most effective way, though to be truly "correct" he should be dropping in the ID of the user, rather than their name, and showing the name with a pop up value list or an unstored calc.

Link to comment
Share on other sites

DJ, thanks for clarifying that Get(AccountName) returns what the user input. That seems a little wacky if you ask me, but, hey, isn't that what life's about? Personally, I'd just lower case it and be done. It worked for e.e. cummings, after all.

Link to comment
Share on other sites

This topic is 5695 days old. Please don't post here. Open a new topic instead.

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...

Important Information

By using this site, you agree to our Terms of Use.