PDA

View Full Version : vb Usergroups


XYZ500
11-29-2014, 10:09 PM
I want to make some changes to usergroups and permissions.

I had four usergroups. Newbies > Members > Senior members > VIP Members.

I want to change to Newbies > Members > Senior members.

I edited the promotions too. Now how do I shift the VIP members to Senior members group? When I try to delete VIP members usergroup it says "All members of this usergroup will revert to the Newbie group."

As I mentioned I edited the promotions too, so will the system adjust the users itself and allocate the current users according to the new promotion settings? E.g, I changed promotions from Newbies to Members from 10 posts to 25 posts. So the users that have more than 10 posts were Members, but according to the new promotion settings users with even 24 posts should be in Newbies. So the users that have less than 25 posts, will they automatically be moved back to Newbies or do I have to do something for that?

kh99
11-29-2014, 10:12 PM
No the promotion system won't demote users. But you can use Move/Prune users (under Users in the admincp) to move everyone back to Newbies, then run the promotion scheduled task.

XYZ500
11-29-2014, 10:45 PM
No the promotion system won't demote users. But you can use Move/Prune users (under Users in the admincp) to move everyone back to Newbies, then run the promotion scheduled task.

Can you instruct me step by step on how to move everyone back to Newbies and then update all the users into their usergroups based on new promotion settings?

Step by step instructions please.

Just FYI, there are around 70k users.

kh99
11-30-2014, 08:02 AM
Hmm, 70k users. I'm not sure how it will work with that many. I haven't done it with that many. I also haven't done it on a live forum. It will probably work, but you might want to close it first to avoid users seeing themselves in the wrong group, and to make it go faster.

Anyway, you would do this:

1) In the admincp, go to Users > Prune / Move Users
2) For the usergroup, select the group you are moving users *from*
3) Enter 0 for "Has not logged on for x days"
4) Press 'Find'
5) Look at the list to make sure it looks like the users you want to move, then scroll to the bottom and select the "Move" radio buttton, and the group you want to move them to, and press "Go'.
6) You can repeat steps 1 to 4 to make sure no users are found in the old group.

and repeat the above if you have another group to move.

But as I said I've never tried moving 70k users this way, so I don't know if that will be a problem. If there's a limit on the users is shows in the list, you may have to do the above multiple times.

Anyway, once that's done, you would then go to the Scheduled Task manager, find the "User Promotions" task, and press the "Run Now" button on the right. That should promote all eligible users to the correct group.

ozzy47
11-30-2014, 09:22 AM
Hmmm, 70k, I wonder if it would be better to do this via a query? I would be willing to bet, trying to do 70k will not work, you might have to do them 1000 at a time, depending on the server.

John Lester
12-02-2014, 07:21 AM
Hmmm, 70k, I wonder if it would be better to do this via a query? I would be willing to bet, trying to do 70k will not work, you might have to do them 1000 at a time, depending on the server.

I think it would be quicker to run two queries. One to move users from the VIP group with less than 25 posts to Newbies, then one to move the rest to Senior. I can't remember if "posts" or "postcount" is in the user table so the following might not work. Also I'm quite tired and have a feeling my syntax is off :D Also I haven't actually fiddled around with any coding since ummm Nov 2012 I think.


UPDATE user SET usergroupid = newbiesusergroupidhere WHERE posts <=24
Then

UPDATE user SET usergroupid = seniorusergroupidhere WHERE posts >whateverpostcountpromotestoseniorgrouphere