3.7.1.2. Different PHP-Nuke sites with the same user base
There are situations that you might want to share users among your PHP-Nuke sites. For example, if you have a site about cars and another one about car insurance, your users will probably be interested in both. But requiring them to enter two different logins and passwords is not going to make them happy - that's where $user_prefix comes into play.
The idea behind a separate prefix for the users table in PHP-Nuke is to enable you to keep all other tables separate, but use the same users table across different PHP-Nuke installations. By using a different $prefix for each site, but the same $user_prefix for both, your users will require only one login and password - nd will be recognized by the second site, while logged in in the first one and vice versa.
To use the same user base in two separate PHP-Nuke sites, proceed as follows:
*
Use the same database as descibed in Section 3.7.1.1.
*
Use separate $prefix values, but the same $user_prefix for both config.php files, e.g.
$prefix = "nuke1";
$user_prefix = "nuke-common";
in config.php for site 1 and
$prefix = "nuke2";
$user_prefix = "nuke-common";
in config.php for site 2. All other values should stay identical in the config.php files of both sites.
*
Edit the nuke.sql file (located under the sql directory of the PHP-Nuke package) for each site. Change every occurence of "nuke_" to "nuke1_" for site 1 and to "nuke2_" for site 2, except the ones for the nuke_users table, which you should change to "nuke-common". The full name of the users table should thus be "nuke-common_users" in both nuke.sql files. Then proceed with the installation as described in Section 3.2.4.