1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Mass moving people from one usergroup to another

Discussion in 'XenForo Questions and Support' started by MGSteve, Oct 9, 2011.

  1. MGSteve

    MGSteve Well-Known Member

    What's the best way to do this - with an eye on the current outstanding out-of-memory bug if you delete a usergroup with a lot of users in it?

    I have too many usergroups at the moment and I want to shrink them down when we move to XF, this means either doing the leg work in VB3.8 or in XF.

    Can you even change people's usergroup membership en-masse in either system? What's the best way to do it?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. MGSteve

    MGSteve Well-Known Member

    I thought it wouldn't be as straight forward as a query. I appreciate this isn't the vB forum, but given people's experience with it - how easy is it to do (and how is it done) in vB, I've never tried to do something like this before in vB.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I don't think many have done it, if at all.

    Primarily because it's not possible via the ACP to mass move from one group to another.
    You can delete the group and the members of that group will default to the Registered group, but that's all you can do.

    So the only way to really do it is via SQL, and then you've got the issue of getting all the queries correct.
     
  5. MGSteve

    MGSteve Well-Known Member

    I don't mind doing queries, but its the hidden side effects that concern me (as Mike noted in a similar thread).

    *sigh* I guess we'll have to wait for either Mike to post a script that we can use as a base to go from & fill in the various blanks so it can delete the usergroups out & handle the updates correctly, or wait until they add it into the ACP.

    I can't help but think that alot of people will want to do what we're trying to do when they bring over a medium to large site over to XF. Our forum has been going for 10 years, there's a lot of spring cleaning to do!
     
  6. akia

    akia Well-Known Member

    Could you not just use the user group promotion tool. To do it. I.e if member of old group longer than a day promote to new group.
     
  7. MGSteve

    MGSteve Well-Known Member


    Doesn't it just add them to that group though, rather than move them?

    Actually thinking about it, you may well be right... I'll give it a go.
     
  8. MGSteve

    MGSteve Well-Known Member

    Actually thinking about it, this would only work when they logged in, wouldn't it? Is there a way to force through usergroup promotions instantly for more than one user?
     
  9. akia

    akia Well-Known Member

    I thought it did it as a cron on vb, I know in the past when I've made changed like that I've just clicked to run the task a few times to get all the changes to go through, as it does them in batches.
     
  10. EasyTarget

    EasyTarget Well-Known Member

    MGSteve:

    I just wrote a series of sql scripts that will do this on the vb side before importing them into XF.
    Like Brogan stated, you would then need to adjust the usergroup permissions on the XF side to make sure everything lines up the way you want it.

    Mainly what I did was force almost everyone into registered member, then handled the special cases like mod, super mod, etc..
     
  11. MGSteve

    MGSteve Well-Known Member

    Yeah, I just checked out the Cron section in the ACP - you can run them on demand... as long as it doesn't time out when promoting 50,000 users or so, it should work ;)
     
  12. MGSteve

    MGSteve Well-Known Member

    Yeah, that will be the backup plan, I'll try the plan by akia above first.
     
  13. MGSteve

    MGSteve Well-Known Member

    hmm, that didn't work out so well, I got a 500 Internal server error when I ran the cron job manually.

    LOL,

    Allowed memory size of 134217728 bytes exhausted (tried to allocate 91 bytes) in /home/xxxxx/xxxxx_html/library/Zend/Db/Statement/Mysqli.php on line 304, referer: http://xxxxxxx/admin.php?cron/
    Back to the drawing board. (pardon the pun)
     

Share This Page