We arrived at another focal point for those who need to use advanced features: how to share the users between different installations of Joomla!
These operations require a good technical knowledge of the use of MySql and phpmyadmin, it is recommended to make a backup of the database before you speak.
As you can see, the database tables involved are:
That contain the information to manage users and groups correctly.
Where to work?
We can imagine that all those who provide a site with different subdomains (it.miosito.com, de.miosito.com, ...) need to store users in a single structure: imagine that an Italian, it registered the subdomain. , will also be logged on as the German site (de.); without sharing users should create a new account, in 99% of cases unwillingly, spending unnecessary time.
We must simply make sure that (in our case) the German version of the site, when users register, does not fit in real 3 tables described above, but include those of the English version, and when Joomla! question goes to those 3 tables in the database of the site in German, those tables corresponding to the Italian, so that the db to Joomla! Joomla! Italian site acts as an aggregator for all accounts: If, for example, one day we wanted to add the French language installing Joomla! in a subdomain (fr.), we should simply repeat this operation.
Why act like this?
In our opinion, especially on medium-large sites, install components for managing multilingual can be counterproductive: for example, just think that Joom! Fish 2.0 stable for Joomla! 1.5, was released one year after the release of new version of CMS, by preventing the migration of fact many sites.
Working in this way we left external components and maintain everything we install cleaner.
The optimal environment
We would like to suggest using the same host as MySQL to do this, so as not to unduly complicate their lives.. These operations can be carried out only in MySQL 5 or higher. Two databases (it_db and de_db) is sufficient for our two facilities (although we could use one, but we recommend to alleviate the same structure of the database, to use two separate).
How to operate?
From MySQLQueryBrowser phpmyadmin or delete the tables above 3 Available German (then the database de_db).
After this simple operation we have to create so-called 'views' (view) they are used to "convert the query" to redirect to another table. Retrieve a user, for example, if we create a view, a query becomes: retrieves the user with ID = 62 from Table X, but X is a table view of the table Y, and then retrieves the user from the table Y
How to create views?
We select the database it_db, click (from phpmyadmin) on the button "SQL" and insert the following syntax:
CREATE VIEW de_db.jos_users AS SELECT * FROM jos_users De_db.jos_users CREATE VIEW AS SELECT * FROM jos_users
At this point we run the query.
Once again launched the operation two more times, inserting syntax like:
CREATE VIEW de_db.jos_core_acl_aro AS SELECT * FROM jos_core_acl_aro De_db.jos_core_acl_aro CREATE VIEW AS SELECT * FROM jos_core_acl_aro
CREATE VIEW de_db.jos_core_acl_groups_aro_map AS SELECT * FROM jos_core_acl_groups_aro_map De_db.jos_core_acl_groups_aro_map CREATE VIEW AS SELECT * FROM jos_core_acl_groups_aro_map
Obviously we need, if our database for the installation is called German de_db, change the references in the query above.
At this point we have created the infrastructure for the sharing of users: If you register on one of two sites, the account will be recorded even on!