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

Integrating 3rd Party App

Discussion in 'XenForo Development Discussions' started by theJay, Jun 8, 2015.

  1. theJay

    theJay Member

    Hello.

    I would like to ask for assistance in developing a custom plugin for my community. We have a third party C++ application that uses a MySQL back end. Users can already register for the third party application through the client program. We'd like to nix that and have this process occur when they register via xenForo. That way we can cut down on spamming and botting accounts.

    We'd like for this to hook into the xenForo registration process and have the information inserted into the 3rd party database at the same time. We'd also like to have the password updated in both if the user decides to do so.

    User registers ----> information is sent to xF database and $app's database.
    User activates via -----> $value in $table is updated to activate account
    User changes password -----> information is updated in xF database and $app's database.

    We need to access the plaintext password, as this program uses a different hashing method. Here are the columns from the external db that we're working with.

    $username (xenforo username, varchar 32)
    $password (hashed password, varchar 255)
    $id (randomly generated, int 10)
    $active (is the account active? 1 is default, meaning yes, tinyint 1)
    $salt (randomly generated salt used to hash password, varchar 32)

    $secret (variable set by us, used in password hashing)

    Our program will hash the user's plaintext password as such ---> ($secret + $rawpassword + $salt) using SHA256.

    --

    So if all goes well, when the user registers, xenForo will take the person's $username, generate random 10 digit interger $id, generate random 32 digit varchar $salt and hash the password combo ($secret + $rawpassword + $salt).

    Then, as it inserts information into xF's datrabase, also insert the $username, $password, $id, $active (set to 0) and $salt into the 3rd party database. Once the user activates their account, it should change the $active value to 1, thus enabling their account. If the user wants to update their password, it should run through that same hashing process and insert the necessary ($password and $salt) info into the third party database.

    --

    I have a fairly decent understanding of PHP, but not very familiar with xenForo's syntax or where to hook into. Any advice on where to start is much appreciated. If this is out of my scope, my team is willing to compensate privately, though please send that through PM as this thread is to explore the option on our own.
     
  2. Jake B.

    Jake B. Well-Known Member

    Alfa1 likes this.

Share This Page