Insensitive
Purpose
WordPress usernames are case-sensitive by default.
This is a great and friendly features that confuses the hell out of some users who got brainwashed into the other thinking by popular Internet sites. And so we keep getting irritated complaints along the lines of “Why cannot I log in? – I know how to spell my own name!” It gets worse once they realized that they actually do have trouble spelling the capitals…
To make things more confusing, when a user registered as “Joe” tries to log in as “joe”, he gets a misleading message: “Incorrect Password”, even if there is no such user as “joe”. It is a security feature, I understand, but it takes some digging to figure out that when the users complain about passwords, what they are actually having is a capitalization problem.
This “Insensitive” plug-in takes care of the problem.
System Requirements
Insensitive plug-in will only work with WordPress 2.0+ due to its usage of the “sanitize_user” filter.
Something is bugging me a bit: this plugin depends (among other things) on get_userdatabylogin function being case-insensitive. Why is get_userdatabylogin case-insensitive, which seems against current WordPress thinking. If thisever changes (due to a database overhaul?) this plug-in will stop working in some user creation scenarios.
All you have to do is install it (see installation section below, no surprises there).
- There is nothing to configure.
- There is no need to convert your existing usernames.
- No PHP or CSS knowledge is required.
What it does, how it works
Once the plug-in is installed, your usernames will be treated in a case-insensitive manner.
For example:
- if you have username “Joe“, the user can log in as “Joe“, “joe“, or “jOe“
- if you have username “joe“, the user can also log in as “Joe“, “joe“, or “jOe“
- if you create a user with username “Joe“, it will be recorded as “joe“. The “nice name” will not be affected.
- if you already have a “Joe” and try to create a “JOE” (or a “jOE‘), you will get a “username already exists” error message.
Potential problem:
- if you already have both “Joe” and “joe” usernames, upon installation of this plug-in one of them will become inaccessible. I know, it is a rather insensitive behavior, but you have been warned, right? – Sorry, I just could not resist a bad pun. You can identify such cases by eyeballing your “Users & Roles” page – it is sorted by username.
Solution:
- contact both users (do not play favorites!), ask them to pick different usernames.
- Create a new username. When deleting an old one, assign all posts to the new username you just created.
- Done.
If you have thousands upon thousands of registered users… write a conversion script. I do not think I am qualified for that. Sorry.
Shameless (but useful) Plug
Insensitive strives to minimize login problems. If you are thinking along these lines, you should really check out my Trim Passwords plugin – it takes care of the legion of people who cannot even copy/paste a password correctly.
Disclaimer
I wrote “Insensitive” for my own purposes, not for public distribution. It is provided “As Is” and can probably do horrible harm.
I do not know PHP. I have never written a full PHP program in my life. Not even “Hello, World”. This means the code may be buggy and is guaranteed to be sub-optimal.
If it works fine for you, please leave a comment here – it will encourage me and other potential users. Oh, and if you can make it better – go for it!
Download
Have you read the Disclaimer above??? – download Insensitive here: Insensitive plug-in for WordPress, version 1.0
Installation
- Download the plugin (see “Download” above).
- Rename insensitive.txt to insensitive.php and put it into your plugins directory (/wp-content/plugins/) or in a sub directory of the plugins directory.
- Activate the Plug-in.
- Enjoy!
- There is nothing to configure.
- There is no need to convert your existing usernames.
- No PHP or CSS knowledge is required.
Thank you
Writing all this up took time and effort. If you happen to be actually using this plug-in – I appreciate your vote of confidence and would love to hear about it!
Got a problem? – Report it here!
21 Comments
Jump to comment form | comment rss [?] | trackback uri [?]