wp_users.user_login is not unique

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

wp_users.user_login is not unique

Andrew Krespanis
Hi,
I'm unsure as to whether to post this as a bug report, so I'm going to
bring it up here first.

this should (imo) throw an error:

INSERT INTO `wp_users` ( `ID` , `user_login` , `user_pass` ,
`user_nicename` , `user_email` , `user_url` , `user_registered` ,
`user_activation_key` , `user_status` , `display_name` )
VALUES (
'', 'thisisBad', '', '', '', '', '0000-00-00 00:00:00', '', '0', ''
), (
'', 'thisisBad', '', '', '', '', '0000-00-00 00:00:00', '', '0', ''
);

But no, both rows are successful.

I understand that WP does it's own check prior to creating a new user,
but is there any reason the integrity of such an important table isn't
being enforced by table constraints?


Andrew.
--
http://leftjustified.net/

_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wp_users.user_login is not unique

Geoffrey Sneddon

On 26 Feb 2006, at 06:36, Andrew Krespanis wrote:

> I understand that WP does it's own check prior to creating a new user,
> but is there any reason the integrity of such an important table isn't
> being enforced by table constraints?


It was removed for some reason for WP-MU, and then that change was  
backported to WP, to try and keep the two as similar as possible.  
Hopefully someone can be more specific as to why.


- Geoffrey Sneddon



_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...