Sanitize users users_field_data table email, passwords in Drupal 8 with a query


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

</> CopyGet raw version
  1. UPDATE `users_field_data` SET `mail` = CONCAT('user+',users_field_data.uid,'@localhost'), `init` = CONCAT('user+',users_field_data.uid,'@localhost'), `pass` = MD5(CONCAT('user+',users_field_data.uid,'@localhost')) WHERE users_field_data.uid > 1;