Skip to content

Instantly share code, notes, and snippets.

@dustincurrie
Created December 1, 2010 20:21
Show Gist options
  • Save dustincurrie/724146 to your computer and use it in GitHub Desktop.
Save dustincurrie/724146 to your computer and use it in GitHub Desktop.
Sanitize user table in Drupal with Drush
#!/bin/bash
drush sqlq "UPDATE {users} SET pass = md5('pass') WHERE uid > 1;"
drush sqlq "UPDATE {users} SET mail = concat('myaddr+', replace(mail, '@', '_'), '@testdomain.org') WHERE uid <> 0 AND instr(mail, '@testdomain.org') = 0;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment