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

XF 1.1 Fixing User Groups

Discussion in 'XenForo Questions and Support' started by The Observer, Jan 24, 2014.

  1. The Observer

    The Observer Member

    So the forum I am an Admin (without actual server access, AdminCP only) and I want to fix our user groups. For one reason or another the user groups are very messed up right now. As an example we have a user group called "Registered Updated" which people get promoted to after they make their first post. Some users have this as their primary user group while others have it as a secondary user group with simple "Registered" as their primary.

    Is there a way, within the AdminCP of XF V1.1.3, to make it so that all those who currently have the Registered Updated user group as their primary get adjusted to have it as their secondary with Registered as their primary?

    Or am I out of luck as it requires a direct database query?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    If you upgrade to 1.2 you can use the batch update users function to move them all to the Registered group and then start setting them up properly.

    There is no equivalent function in 1.1 and it can't be done using queries.

    This resource explains how to set up permissions: http://xenforo.com/community/resources/implementing-permissions-across-multiple-user-groups.358/

    This page of the manual explains how to set up a promotion after x moderated posts: http://xenforo.com/help/user-group-promotions/
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Oh, one thing you can do is delete all custom user groups.

    That will make everyone fall back to the Registered as their primary.
  4. The Observer

    The Observer Member

    Hmmm.... that might work. As we have ~80,000 members I'm definitely going to want to do that in a test environment before I do it "live" though. No going back on that one if something weird happens.
  5. Brogan

    Brogan XenForo Moderator Staff Member


    Try it on a test install first and even then, take a backup of your live site being doing it there.
  6. The Observer

    The Observer Member

    Ok so I did this.

    I reworked all my permissions, I deleted the "Registered Updated" group moving everyone into the "Registered" group.

    I recreated the "Registered Updated" group and ran the "User Group Promotions" Cron. I now have less than 10k of my members with the promotion applied. This includes people that are currently active/online.
  7. The Observer

    The Observer Member

    I even tried (in desperation) running a user upgrade that simply took all "Registered" and promoted them to "Registered Updated" with minimal effect.

    What options do I have?
  8. The Observer

    The Observer Member

    Ok so further details.

    When I pull up a few individual users who are having issues somehow they got moved into the Administrators user group as their primary group!

    But when I do a user search for all users who have their primary group as Administrators there are no results. If I go to said users, it clearly says they are in that group.

  9. Brogan

    Brogan XenForo Moderator Staff Member

    Which user groups do you have now and what are the IDs of them?

    The default user groups should be:
    • 1 - Unregistered / Unconfirmed
    • 2 - Registered
    • 3 - Administrative
    • 4 - Moderating
  10. The Observer

    The Observer Member

    I have those 4 user groups plus several others including the following ID numbers: 174, 67, 171, 175 (This is the registered updated), 145, 5, 173

    So what I did was the following:

    1. Searched for anyone who may have a different primary user group than ID #2 (EXCEPT those in the registered updated group)
    2. If I found someone, I made that primary (non #2) group into a secondary one
    3. I then changed their primary group to ID #2
    4. Once I triple checked that there were only people with primary user ID #2 and the registered updated I deleted the registered updated
    This should have moved anyone who previously had "Registered Updated" as their primary ID into the #2 group as their previous group no longer exists.

    What SEEMS to have happened is that they got moved to the Administrators group as when I search out these problem users (there could be several thousand) by name and view their profile it says their primary is Administrator. But if I do a user group search for everyone with the primary user group Administrator (#3) it comes up with no results. Additionally, if I modify the administrators user group to allow them full access these people still can't do anything. So it is saying they are in that group as their primary but it isn't accessing those permissions for them either.
  11. Brogan

    Brogan XenForo Moderator Staff Member

    That doesn't make much sense - I haven't heard of that happening before.

    How did you search for and move/change all of the members who didn't have the Registered group as their primary?
    If they are in the Administrator group then searching on that should return all of the members.
    Are you entering any additional search parameters?

    Did you do this on your test/local site or live site?
  12. The Observer

    The Observer Member

    Did this on the live site after lots of testing on my test server.

    There are no other search parameters. I'll take some screen shots, stand by.
  13. Mike

    Mike XenForo Developer Staff Member

    I think they're not actually in the admin user group -- it's just the first one in the list and, because they're not actually in a valid user group, it's selecting that. (You can confirm by inspecting the HTML.)

    In 1.1, deleting a user group with a lot of people in it was problematic because of all the data changes that had to happen. 1.2 solved this though.

    The problem now is that there's outdated data in the system and that's not really the expected case. Upgrading to 1.2/1.3 (when out) would be a good idea, but it won't retroactively sort this. I could put together a quick script to sort this with access. Based on your signature, assuming you're Andy, drop me a message.
  14. The Observer

    The Observer Member

    Thanks Mike, PM sent.

    Our server has temporarily decided to take a nap so I can't get the screenshots and I need to head to work.

    Attached Files:

Share This Page