Integrating full site membership with xenforo

indepth

Member
I need to have an integrated membership registration/login (which will include a tiered pay wall) that will work to pass the username, verification, and membership level between my main site and the forum software. So that when a user signs up on the main site and pays, they are automatically given access to the forums with the proper level of permissions based on their membership.

On another site (with another board software package) I simply kept two member databases and was able to use a couple php commands to pass the login verification back and forth between the site and the forum software. I haven't been able to find any such mention of how this could be done with xenforo; but I'm sure it must be possible.

Or is there an addon already built with this capability?

If not, can someone point me in the right direction for php commands that would be useful to verify user exists and automatically log them in?

I was also thinking I could possibly just use the xenforo upgrade option for all membership purchases, if I can figure out a way to hand that back to my main site pages after signup. Not sure if that will be easier or more complicated though.

Anyways, any help would be appreciated. I've spent a few hours trying to search the forums and reading all the manuals and support docs; but I can't find any references to anything like this.
 
Group changes for a user in XenForo need to be handled programmatically. You can't just update the database. There are cache rebuilders within the XenForo software. So pushing group changes to XenForo from another piece of software requires some PHP programming. This may or may not be simpler than going the other direction.

What software is your "main site" using?
 
The main site for this integration is custom built with php. No users yet. Just installed Xenforo this week to start the integration.

The previous site I mentioned, I built with Vbulletin. In that one, I could BOTH pass commands like adduser='Jake Bruce' to what is basically a forum subroutine, and I could also automatically log users in with just their username being passed via another command. So, if someone was browsing the main site and logged in, then if they clicked on a link to the forum I would automatically log them in before passing them over to the forum. So, as far as they knew, the login on the mainsite was the same as the login on the forums.
 
You can use a similar approach with XenForo. You just need to write the code. It's a programming problem.
 
I've taken a bit of a look at the xenforo code, and it seems much more complicated than the previous integration I had done. Vbulletin (at least back 2 or 3 years ago) had a lot of code, but most of the routines were visible directly in the index and signup scripts. It seems almost everything in Xenforo is buried deep in the libraries. So it's much harder for a newbie to find the routines that need to be edited or accessed.

Any chance you could help me isolate the library routines that needs to be edited to manage both user signups and user logins? I'm sure I could find it eventually, but it'd be great to save the 1, 2 or more hours of searching through the libraries one at a time taking notes.

I basically need to:

1. Re-direct the user signup to a custom php page for my site (no one should ever be able to signup through the default xenforo page)
2. Be able to call (or pass) signup data to the xenforo subroutine upon user signup on the custom page
3. Be able to edit the user group remotely via a script for users after signup (to control their user group based on what membership they signup for)
4. Be able to set a user to logged in with regard to xenforo based on just their username (after they have logged in successfully to the main site)

Any help at all on one or more of these tasks would be really appreciated. I underestimated how much more complex this type of implementation would be using xenforo.
 
Last edited:
Good news is @LPH (Author of XenWord) is good at this type of stuff (login, group stuff).
But that stuff is usually handled here .... https://xenforo.com/community/forums/xenforo-development-discussions.34/

Yeah, I just assumed support was all in one place at first. Now that I've had time to explore the forums fully, I see the development sub are probably more appropriate for this question. But I didn't want to double post. I'll let the mods decide if they want to move the thread.
 
Back
Top Bottom