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.
There’s an 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.
Complications?
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.
Tags: joomla shared users, jos_user, jos_user table, jos_users, merge jos_users
Richard
| #
I notice your using 1.5 tables, there should not be much difference when syncing 2.5 tables? The only extension I have used was “sync”, and it was a while ago. It worked well for my application, but it wasn’t a high traffic application or that complicated.
Reply
columbusgeek
| #
Sure Richard, when doing 2.5->2.5 or 1.5->1.5 that’s not a problem. Just keep in mind you cannot sync a 1.5->2.5 due to the changes in the Joomla ACL.
Reply
braca986
| #
@columbusgeek Can someone tell what tables are used in 2.5???
Reply
columbusgeek
| #
@braca986 If I recall correctly it’s the same ones. Do you see something different?
Reply
universita
| #
i totally agree with columbsgeek, this can`t be done between 1.5->2.5 especially with the latest version of joomla 2.5
Reply
universita
| #
i totally agree with columbsgeek, this can`t be done between 1.5->2.5 especially with the latest version of joomla 2.5
http://www.wwuniversity.eu
Reply
universita
| #
with joomla 2.5 after i log in on my site i can navigate through site without log out
Reply
universita
| #
i use joomla 2.5 and i have not faced this problem. I can log in once and after that i can navigate through sites
Reply
ALnews
| #
i use joomla 2.5 and i have not faced this problem. I can log in once and after that i can navigate through sites
http://www.lajm-shqip.com
Reply
Kinsealyplumbing
| #
@Matt King, Very nice article about joomla installs, I am new in joomla, So i am finding new articles about joomla.
Reply
braca986
| #
This thing saved my life… Thanks a lot for sharing… Just i’m stuck in sessions problem… when i check cookie “__utmz” on 2nd site it is just “1stsite.com” and by extension if i change it “2ndsite.1site.com” its working… Can someone tell me where im doing wrong???
Reply
braca986
| #
Ooops… My bad… Everything seems to be working in perfect order… Thanks a lot again…
Reply
braca986
| #
Excellent everything works like charm… Thanks a lot…
Reply
tincan
| #
Hi this looks like the answer to solving my problem however the links are down to the sources you have referred to in the article.
Please please please can you explain the process by updating the article.
Reply