13
I started looking into this (through the code) and was wondering if I'm on the right path. Please remember I'm new to this and am trying to understand how XOOPS works.
Basically I think this will work. There is most likely an easier way to get the end result but,...
I install a new XOOPS into any directory and have the installer create the tables. Let's have these have a prefix of 'common' for ease of understanding.
Then I install two sites that I actually want to use and to share users/groups. Let's call these prefixes 'site1' & 'site2'.
I found that in mainfile the db prefix is stated. I also found that in \html\kernel\user.php in the function &get(&id) there is a reference to prefix
$sql = 'SELECT * FROM '.$this->db->prefix('users').' WHERE uid='.$id;
There are several like this. I'm assuming that instead of using this constant, if I hardcode 'common' inplace of the prefix, this would then direct the query to the 'common' tables where I want the users to be. If I changed this in both 'site1' and 'site2' file, then both sites would share the users.
I say assume because I haven't try this yet. (Still building a test box).
Just wanted to know if this was the right road or should do a U-Turn and take that left folk in the road.
Cheers