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

XF 1.1 Massively change primary usergroup

Discussion in 'Troubleshooting and Problems' started by Francesco V., Apr 5, 2013.

  1. Francesco V.

    Francesco V. Active Member

    I migrated from vBulletin where i had a custom usergroup named Registered Full. When users reached 20 posts their primary usergroup switched from standard Registered to Registered Full.
    After migration i have those users in a xenforo primary usergroup named Registered Full. What i wish is to switch those users to Registered as primary and adding Registered Full as Secondary.

    How can i achieve it ? Should i play directly with the database ?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The easiest way (without resorting to hackish methods) would be to delete the Registered Full usergroup - all of the members which have that group as their primary will then default to the Registered user group as the primary.

    Then you can create a new Registered Full user group and a corresponding promotion.
     
  3. Francesco V.

    Francesco V. Active Member

    Do you mean that if i delete user group Registered Full, all the users belonging to it will get Registered as primary group ?
     
  4. Francesco V.

    Francesco V. Active Member

    ok i made a test on a local installation and all users were moved to registered.
    Now i created a promotion, with condition if message >= 20 then add to Registered Full secondary group, then i run the cron job for promotion but nothing happens. No users got the promotion
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

  6. Francesco V.

    Francesco V. Active Member

    yep, i read that but that means any member active in the last 72 hours starting from the last cron job run ?
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  8. Francesco V.

    Francesco V. Active Member

  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  10. Francesco V.

    Francesco V. Active Member

    Hummm, anyway i run it but no effect. Do yo confirm that it process ALL users, not checking if they were active in the last 72 hours ?

    Thanks a lot
     
  11. Francesco V.

    Francesco V. Active Member

    Ok, i'm a dumb that forgot that i'm able to read code :p

    Is ok if i delete

    Code:
    , 'last_activity' => array('>', XenForo_Application::$time - 86400 * 3)
    from
    Code:
            $conditions = array(
                'user_state' => 'valid',
                'is_banned' => 0,
                'last_activity' => array('>', XenForo_Application::$time - 86400 * 3)
            );
    in order to not count last activity ?
     
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Correct. Remove that line to process all users.
     

Share This Page