User promotion but from a secondary user group? Is that possible?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Darakir
    Senior Member
    • Feb 2010
    • 109

    [Forum] User promotion but from a secondary user group? Is that possible?

    What I want to do is have everyone from a certain usergroup (not a primary one), automatically be transferred into a second user group.
    Promotion almost does what I want, but it only works when the first usergroup is a primary one.

    I can hack this in php, but I'd like to know if there is a way to do it that I'm overlooking.
  • Darakir
    Senior Member
    • Feb 2010
    • 109

    #2
    To make this clear, I can add some context perhaps. We are selling a game, and people can register games on our forum. This will land them in a game user group that gives some stuff. The ones that pre-order we want to automatically put in a second user group as well, to be able to give them a few extra perks. So I would turn this off again once the game goes live.
    Is this possible to do within the current vbulletin system?

    Comment

    • Darakir
      Senior Member
      • Feb 2010
      • 109

      #3
      I guess the no-reply is a no then. php hack, here we come.
      A hint for anyone else who is trying to solve this and sees my post, here is how we did:
      Code:
      $query = "SELECT userid FROM ".TABLE_PREFIX."user WHERE usergroupid = $usergroupid OR FIND_IN_SET($usergroupid, membergroupids)";
      $users = $vbulletin->db->query_read($query); 
      
      while( $currUser = $vbulletin->db->fetch_array($users) )
          //Do stuff here
      It is the OR FIND_IN_SET($usergroupid, membergroupids) that is the trick that took us a while to figure out. We found it in another forum somewhere eventually.

      Comment

      • Ace
        Senior Member
        • Apr 2004
        • 4051
        • 4.2.X

        #4
        Or, couldn't you make a separate group for the Pre-Orderers, giving them that level of permissions?
        My Live vB5 Site - NZEating.com
        vBulletin Hosting | vBulletin Services - Need hosting for your vB? Need it installed? Something else? Let me take that hassle off your hands.

        Comment

        • Darakir
          Senior Member
          • Feb 2010
          • 109

          #5
          Originally posted by Ace
          Or, couldn't you make a separate group for the Pre-Orderers, giving them that level of permissions?
          I have a separate group for them, what I want is a way to put them in it.
          They only get one code to register their game with, and the registration system only puts them in one user group per code. They need to be in the regular game user group as well. We are talking about thousands of people, so it is not really feasible to do it manually either.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...