PDA

View Full Version : Query for moving one usergroup to another


WEForums
06-05-2003, 07:00 PM
What's the query for moving unregistered users into registered users? Don't ask how they got there. :o

filburt1
06-05-2003, 07:05 PM
UPDATE user SET usergroupid = registered usergroupid WHERE usergroupid = unregistered ugid;

WEForums
06-05-2003, 07:07 PM
100% sure that is correct, right?

UPDATE user SET usergroupid = 2 WHERE usergroupid = 1;

That is the precise thing? No ' needed or anything?

filburt1
06-05-2003, 07:12 PM
Right. If you are doubtful, back up your database first (always a good idea with UPDATE and DELETE queries, anyway).

WEForums
06-05-2003, 07:14 PM
Thanks! Worked perfectly.

Sucks to back up the database when it takes a good 20+ minutes. But it's better to be safe than sorry.

Again, thanks.

WEForums
06-05-2003, 08:33 PM
This is a bit strange. After running the query all members become 'registered.' However, they still cannot access the pages...even though guests CAN access all pages. If I modify their profile they are in the unregistered group....so...what the heck?

Is there some sort of query that changes their user options?

And I am still pondering why they would be unable to access ANY pages if they are in the 'unregistered' group when guests can view the board...

Crud. :hurt:
EDIT: Hmm, a moderator (he modded a forum, but his group was unchanged) told me they couldn't access the site...however, a regular member told me they could....weird...I dunno...