merge jos_users – iJoomla Blog https://www.ijoomla.com/blog iJoomla Blog Fri, 14 Apr 2023 08:50:44 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.4 One set of Joomla users, multiple Joomla installs https://www.ijoomla.com/blog/one-set-of-joomla-users-multiple-joomla-installs/ https://www.ijoomla.com/blog/one-set-of-joomla-users-multiple-joomla-installs/#comments Fri, 30 Mar 2012 15:31:41 +0000 http://www.ijoomla.com/blog/?p=1360 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.

jfusion or editing jos_tables manually?

Random Indeed.

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.

jos_users jfusion & workarounds

DANGER! SQL QUERIES AHEAD!

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.

sharing jos_user tables

This looks scarier than it actually is

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.

fixing joomla subdomains and cookies

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.

]]>
https://www.ijoomla.com/blog/one-set-of-joomla-users-multiple-joomla-installs/feed/ 14