Log in

View Full Version : How do I import users and delete their emails?


Tigur
11-14-2007, 11:13 AM
I would like to import all my users from my live site to my test site, yes i know use impex, after the import however, or even before? I would like to delete all the users e-mail address' upon import and if possible replace them with a different email address.

Opserty
11-14-2007, 07:24 PM
You'll probably need a PHP script or something to update the emails to something unique.

If you just want to change all the emails to the same thing you can run a query after you have imported the database.

UPDATE `user` SET `email` = 'SOMESTRING@SOMESTRING.COM'


Although if you want to get a little more complex you could use PHP to generate a random like email address.