[wp-hackers] wp_users.user_login is not unique

Andrew Krespanis leftjustified at gmail.com
Sun Feb 26 06:36:34 GMT 2006


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/


More information about the wp-hackers mailing list