How to integrate xenforo with my own application using customization

Clarence

New member
Hey folks. I'm new to xenforo and there are two questions that have really got me on my nerves. Shall highly appreciate if someone generous can take a few minutes to please help me.
So here's the scenareo:
I'm integrating the forum with one of my web applications, on which the users are assigned badges, similar to how groups are assigned to users in xenforo.
What I'm wanting to do is to fire mysql query on:

1. When a user registers on my application, I'm wanting to fire queries to xenforo xf_user tables so that the user with similar email ID and password can be registered automatically (through the query that I'm wanting to fire), allowing them to use the same creddentials to login on xenforo therefore.
While trying to do that right now, I'm able to fire query, but there's this table called xf_user_authenticate, in which there are columns data and remember_key which have some Hash key/random numbers/alphanumaric strings generated and I'm unable to make them via queries that I'm firing. Can someone explain what is the format of these and how, exactly do I create those value while registering a new user via mysql queries if I had to do that? What functions are being used for generating these values that are being generated?

2. Other part of my current applications is to assign badges (groups in case of xenforo), which as well I'd like to do via mysql queriessince I'd like the groups assign in my application to automatically since with the groups on xenforo (they're the same names actually). I'm performing query on xf_user , but the value is going in column secondary_group_ids in encrypted form i am unable to uderstand this and I'm able to do it all, but here too, there's the hashkey formatted value, which is blocking my queries to actually reflect in xenforo.

Can someone please help?
I understand that these are a little vague requirements but they're extremely important to me and the help shall be highly appreciated.
Thank you and I'll look forward to an earliest response.
 
Generally, speaking, the answer to both of these is that you don't want to be manipulating the database directly. You should use the PHP APIs and specifically the user data writer. It will create most of the data you need. Similarly, if you are changing groups, you need to do this through PHP as there is a lot of data to update when a group changes (including rebuilding permissions).

xf_user_authenticate.data is the password for the user, stored in a hashed form based on the type of hashing used. See XenForo_DataWriter_User::setPassword().
 
Top Bottom