One set of Joomla users, multiple Joomla installs
Every once in a while there will come a time in your Joomla career that will necessitate the need to have two or more Joomla sites for one project. You don’t want to force your users to sign up for two sites–it’s annoying. You want them to sign up once, and be able to login to both the Joomla sites.
app extension for that
Extensions exist that tackle this problem. jFusion is the biggest player in this arena, and really shines when you need to merge users from Joomla to other CMS’s or scripts such as vBulletin, XenForo, Magento and others. It has it’s flaws though, and after using it for a while I started searching for a different option. After searching for a few weeks I came across this post on Joomla.org. After messing around with many different “extension based” solutions I was excited to try a more backend approach to the problem. Extensions are fine to a point, but jamming your site full of every plugin/component/module that you see on Joomla.org is only going to give you more trouble than it’s worth. Digging into how things work will give you a better understanding of how your site operates and how to keep things lean. In this case, the solution is not all that complicated either.
Warning, Warning Will Robinson!!
This is considered an advanced project that should only be tackled by somebody who is familiar with phpmyadmin, (or some sort of sql tool), how to run sql queries, and is very comfortable with Joomla and it’s inner workings. This should only be attempted on a development site, not on your live site, unless you have a sure fire recovery plan in place already and have no live traffic. Now, with that being said, let’s move on to how we can link two jos_user tables together.
How to use two Joomla sites with one user table?
Birnik covered the how to pretty well in his post, so there is no sense in me re-inventing the wheel. The only thing I might add is that it is very important to go slow, take your time, turn off any distractions and think the entire thing through.
Keeping users logged in
Birniks solution is supposed to keep users logged in, so for example, if somebody logs into Site A, and then navigates to Site B, they should not have to re-enter their login info into Site B. I was not so lucky, and it did not work for me. That may be because I was using subdomains instead of sub directories. In the past I tried jFusion and it has a similar quirk, so I was aware of a Joomla core hack that modifies how cookies are handled and allows you to navigate between sites without getting logged out. You can read more about it here. Ignore anything about Moodle, it is not relevant to our situation.
The only problem I ran into was when new users signed up. They should all go though the main website to register. If they sign up on the slave/sub sites, you will get errors for new users. It’s an easy enough fix however, just add some redirects to send people signing up on the sub sites to the main site.
What’s your solution? Did it work for you?
Do you have any personal experience with attempting to join multiple Joomla sites together? How did it go? Let us know in the comments.