How to have same user of two different sites?



When we have a system of relate site, and we want they have the same user. It will decrease the time of user to register new account. How to have the same accounts?

I have a solution for this problem.

We have to install these database in one server. For example we have two database joomla. We drop the jos_user of the second database. Then, user the root account to execute the sql command follow:


"CREATE ALGORITHM=UNDEFINED DEFINER=`user_root`@`localhost` SQL SECURITY DEFINER VIEW `databasename2`.`bus_users` AS select `databasename1``.`jos_users`.`id` AS `id`,`databasename1``.`jos_users`.`name` AS `name`,`databasename1``.`jos_users`.`username` AS `username`,`databasename1``.`jos_users`.`email` AS `email`,`databasename1``.`jos_users`.`password` AS `password`,`databasename1``.`jos_users`.`usertype` AS `usertype`,`databasename1``.`jos_users`.`block` AS `block`,`databasename1``.`jos_users`.`sendEmail` AS `sendEmail`,`databasename1``.`jos_users`.`gid` AS `gid`,`databasename1``.`jos_users`.`registerDate` AS `registerDate`,`databasename1``.`jos_users`.`lastvisitDate` AS `lastvisitDate`,`databasename1``.`jos_users`.`activation` AS `activation`,`databasename1``.`jos_users`.`params` AS `params` from `databasename1``.`jos_users`;"

After that, we have a new view of jos_user of database1. If we have new insert, or modification or delete, it will affect for the real table in database1.

Hope that can help you!



Responses

0 Respones to "How to have same user of two different sites?"

Post a Comment

 

Link Liên kết

Thông tin liên hệ

YH: huonggiangdhtn
Skype: tthuonggiang
Return to top of page Copyright © 2010 | joomla extensions jw-extension.net