[support] Mass Changing UID
Earnie Boyd
earnie at users.sourceforge.net
Tue Aug 5 19:07:06 UTC 2008
Quoting Shai Gluskin <shai at content2zero.com>:
> Drupal Mavens,
>
> On a site with about 600 nodes I need to change the node author on about 300
> of them. It's very straightforward in that everything that is written by
> uid="2" needs to change to uid="4".
>
> I was about to write a simple sql query to implement in phpMyAdmin but
> thought I'd come here first (*and* back up the db).
>
> I'm seeing uid in two tables: node and node_revisions. Does UID exist
> anywhere else?
>
> Also, would I be fine with just changing it in the node_revisions table?
>
>
The safer method is to node_load(), change the data and then
node_save(). This gives any contrib modules you have a chance to do
anything necessary.
Earnie -- http://for-my-kids.com/
-- http://give-me-an-offer.com/
More information about the support
mailing list