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

define php variables upon account creation and run

Discussion in 'XenForo Questions and Support' started by Alofoxx, Jun 23, 2012.

  1. Alofoxx

    Alofoxx Member

     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You can do that by creating an addon to extend this function:

    XenForo_ControllerPublic_Register::actionRegister

    That will allow you to execute your own PHP code when a new user registers.

    Or you can edit the file directly if you aren't comfortable with the addon system. But a file edit is lost when you upgrade, unlike an addon.

    library/XenForo/ControllerPublic/Register.php
     
    Adam Howard likes this.
  3. Alofoxx

    Alofoxx Member

    How would i make the registration process auth a username as to first askthem their desired username then associate a small auth string and send it to the game server as a msg

    PHP:
    var_dump($r->mcRconCommand('msg $user Enter $auth to activate your username!'));
    like if i make a new account "alobot" and hit next it does
    PHP:
    var_dump($r->mcRconCommand('msg alobot Enter DF3GE to activate your username!'));

    Then it will prompt them to enter the correct auth string before they can add the rest of the information and email verification.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Adam Howard likes this.
  5. Alofoxx

    Alofoxx Member

    thanks Jake, your awesome
     
  6. Alofoxx

    Alofoxx Member

    I have actully decided to make a plugin for the game server that will register player usernames and issue them a code in game and save it to a db
    then my xenforo site can just verify to the db values :D
     

Share This Page