What PHP code in register.php controls mail validation group movement?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Skyrider
    Senior Member
    • Feb 2006
    • 540

    [Forum] What PHP code in register.php controls mail validation group movement?

    As per title. I'd like to know, which part of the code in register.php is controlling where a user is being moved to another group after he/she validated his/her email address.

    EDIT:

    Found it:

    Code:
    $userdata->set('usergroupid', $user['usergroupid']);
    at // ### DO THE UG/TITLE UPDATE ###. line 1507.
    Last edited by Skyrider; Mon 18 May '15, 5:26am.
  • Zachery
    Former vBulletin Support
    • Jul 2002
    • 59097

    #2
    Please don't mess with that code, you're going to break a lot of things.

    Comment

    • Skyrider
      Senior Member
      • Feb 2006
      • 540

      #3
      Originally posted by Zachery
      Please don't mess with that code, you're going to break a lot of things.
      It's not exactly that I want to, it's just that I'm afraid for the steam login system and steam linked primary group users, I have to. The only thing I intend to do is adding a IF / ELSE code. If the user has steam linked, put the user into the steam link primary group, ELSE using the default $userdata->set('usergroupid', $user['usergroupid']); code. From what I tested, nothing has broken down yet. It shouldn't affect normal new vB registered users at all.

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74123

        #4
        The branch is if ($vbulletin->GPC['a'] == 'act')

        You will probably want to use a plugin on the register_activate_process hook.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • Skyrider
          Senior Member
          • Feb 2006
          • 540

          #5
          Originally posted by Wayne Luke
          The branch is if ($vbulletin->GPC['a'] == 'act')

          You will probably want to use a plugin on the register_activate_process hook.
          That's kinda a problem. Whenever someone is activating his/her mail address, and the user is logged out or used the activation link on a different account, the user is being moved to the default registered group 2.

          Comment

          • kh99
            Senior Member
            • Aug 2009
            • 533

            #6
            Originally posted by Skyrider
            That's kinda a problem. Whenever someone is activating his/her mail address, and the user is logged out or used the activation link on a different account, the user is being moved to the default registered group 2.

            Are you saying that a plugin you made isn't working like you expect? Maybe you're using $vbulletin->userinfo (the current user's info) when you should be using $userinfo (the info of the user being activated).

            Comment

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