Registration and login with upper and lowercases

7 years 10 months ago #283157 by activha
Hello

Is there a way to eliminate differences between upper cases and lower cases usernames for registrations and log ins ?

What i mean is :
- if a user register with USERname or USERNAME, can I use some kind of auto action to save only username ?
- if a user is already registered with USERNAME or USERname, is it possible for him to log in with username ? what change would be needed for this ?

Thanks
Jean

Please Log in to join the conversation.

7 years 10 months ago #283162 by krileon

- if a user register with USERname or USERNAME, can I use some kind of auto action to save only username ?

Yes, a Field action.

- if a user is already registered with USERNAME or USERname, is it possible for him to log in with username ? what change would be needed for this ?

Usernames are not treated as case sensitive so it doesn't matter for login purposes.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: activha

Please Log in to join the conversation.

7 years 10 months ago #283185 by beat
You can't register userName and Username same time, unless you choose a non-standard database collation. All utf8_ci (ci for Case Insensitive) collations will do searches and matches independently.

If your login is case-sensitive you should check your database collation, in particular for the username column in jos_users table.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
The following user(s) said Thank You: activha

Please Log in to join the conversation.

7 years 10 months ago #283213 by activha
I guess that [cb:parsefunction="convert" method="uppercase"][username][/cb:parse] would be enough with a after user registration trigger ?

How can I also force all present usernames to convert ?

Please Log in to join the conversation.

7 years 10 months ago #283215 by krileon
I guess that [cb:parsefunction="convert" method="uppercase"][username][/cb:parse] would be enough with a after user registration trigger ?
If you want the username to be entirely uppercase, yes.

How can I also force all present usernames to convert ?

Single quick database query on _users table to convert the username to uppercase.

dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_upper


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

7 years 10 months ago #283216 by activha
ouppss sorry was lowercase instead :-(

I guess that format function is needed in the parameters, but is there any other references or setting to add ?

What would you suggest for trigger : onafteruserregistration only ?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.187 seconds

Facebook Twitter LinkedIn