[wp-trac] Re: [WordPress Trac] #9568: Allow users to log in using
their email address
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 30 12:23:00 GMT 2009
#9568: Allow users to log in using their email address
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: Denis-de-Bernardy
Type: feature request | Status: new
Priority: normal | Milestone: 2.8
Component: Users | Version: 2.8
Severity: normal | Keywords: has-patch tested
-------------------------------+--------------------------------------------
Comment(by misterbisson):
I'm concerned that using preg_replace("/@.*/", "", $user_email) as the
username creates a large opportunity for duplicate usernames. Also, the
idea of building permalinks against an email address (which will
necessarily change in my application as applicants become students at my
university) seems off.
This isn't the solution, but the plugin I developed filters sanitize_user
(which is used for all sorts of things other than actually sanitizing
usernames/aside) and replaces it with a random string (pattern: 'p'. rand(
0, 9 ) . randomstring( 7, 'abcdefghijklmnopqrstuvwxyz' )). I then replaced
wp_authenticate() so it tests against get_user_by_email().
As noted above, that isn't a solution for anybody but me, but it does
result in slightly more friendly author URLs than numbers alone. Still,
I'd prefer using the user ID over using anything based on email address
(other than, perhaps, an md5 of the email address).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9568#comment:15>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list