Sanitize users table in Drupal 6/7 with a query

Public

Sanitize all the mail and password values in the users table. WARNING: Only use this on development environments because this will erase all your users e-mailadresses and passwords.

Get raw version
sql
  1. UPDATE `users` SET `mail` = CONCAT('user+',users.uid,'@localhost'), `init` = CONCAT('user+',users.uid,'@localhost'), `pass` = MD5(CONCAT('user+',users.uid,'@localhost')) WHERE users.uid > 1;

Comments

claudio.fernandes's picture

drush sqlsan -> does that too