Log in

View Full Version : mass usergroup move


Benj
11-22-2004, 12:25 PM
is there a way to move all your users from 1 groups to another. ive imported my database using impex and now i have a custom group called registered users need to copy them all over to the standard registered users group.

Benj
11-23-2004, 12:37 PM
*bump*

Andreas
11-23-2004, 01:17 PM
Copy or Move?

Move (eg. change primary group)
update user set usergroupdid=newgroupid where usergroupid=oldgroupid

Copy (eg. make them secondary members of the group)
update user set membergroupids=concat_ws(',', 'newgroupid', membergroupids) where usergroupid=oldgroupid

Benj
11-23-2004, 02:09 PM
yeah now there additional users now is that ok or

blubber12
11-24-2004, 12:39 AM
In admincp users/move/prune. Select the group you need to move, click find and then choose the destination group

Benj
11-24-2004, 06:17 AM
man that query really messed up me forum i got white pages now when ever i try and access any thing

forum dir > http://www.welshsound.com/client/

Benj
11-24-2004, 07:15 AM
my membergroupids have ",2" (without quotes) is this normal ??? if not how can i get rid of it

Benj
11-24-2004, 07:58 AM
and every page in the vb directory shows up as a white page now???? ahhhhhh

Benj
11-25-2004, 09:47 AM
ok i fixed the white page error.

but users get an error when they try and login

this is my users database

i removed the , before the 2 in membersgroup id and that let users login whats a query i can use to remove all the ,'s

Andreas
11-25-2004, 11:13 AM
First of all, it's not a good idea to show password hashes ...

Secondly, it does not make sense to have a secondary usergroup which is the same as the usergrouid.
If all your Registered(usergroupid 2) users look like that

update user set membergroupids='' where usergroupid=2