2

I am responsible for a few web sites of my organization.

I use Joomla! 2.5.9 for those web sites. They all are running at the same server.

I use K2 component for content managing.

I have a general website in which shows all the staff information at the 'Staff' page. Also some of those people and their contents are shown in another department's website. So, there are databases for each web site.

For example:

In the general website (let's say general.org), when I click on the 'Staff' menu item, page shows all of the people work at my organization. Also they work at different departments.

In another web site (eg: education.general.org) when I click on the 'Staff' menu item, it shows the people work at education department.

But for each web site, I have different user accounts which means a modification in one of them does not affect the other one. If the one of the education staff tries to change his profile picture on the education web site, he also has to do it on the general web site.

And sometimes one person might be working at two departments. Thus he has to edit three times of his data.

Is it possible to merge the records for all websites? In other words, I want everyone to insert/update their data on the general web site, and the other web sites will be updated automatically.

1 Answer 1

1

I think what you are trying to do is share users/profiles across the different sites without changing articles or anything else. If that is correct, I think you need to do something like this:

DROP TABLE xxxx2_session
DROP TABLE xxxx2_usergroups
DROP TABLE xxxx2_users
DROP TABLE xxxx2_user_notes
DROP TABLE xxxx2_user_profiles
DROP TABLE xxxx2_user_usergroup_map

CREATE VIEW xxxx2_users AS SELECT * FROM xxxx1.jos_users
CREATE VIEW xxxx2_session AS SELECT * FROM xxxx1.jos_session
CREATE VIEW xxxx2_usergroups AS SELECT * FROM xxxx1.jos_usergroups
CREATE VIEW xxxx2_user_notes AS SELECT * FROM xxxx1.jos_user_notes
CREATE VIEW xxxx2_user_profiles AS SELECT * FROM xxxx1.jos_profiles
CREATE VIEW xxxx2_user_usergroup_map AS SELECT * FROM xxxx1.jos_usergroup_map

Source

Please be aware that I have not tested this but in theory it should work. Be sure to make backups of everything before working on your site, especially when messing with DB tables.

2
  • Thanks for your reply. Can you tell me where to write these queries? Mar 29, 2013 at 9:22
  • These are SQL queries so you would want to run them on your database, the easiest way would be to do it in PhpMyAdmin. If you aren't familiar with the process you probably will want a developer to do this for you. Mar 29, 2013 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.