Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Dual vanilla install user integration
ThaRiddla
New
I've been poking around in both the documentation and on the forums and have been unable to find what I'm looking for.
I have a vanilla install in my root directory and an additional install outfitted with Jazzman's Issue Tracker in a subdirectory "projects". Currently I'm manually mirroring the User database tables to allow a single login to work with both installs, which is highly annoying and time consuming whenever i get a new user or someone changes their information. Is there a way that I can redirect the projects install to point to the root directory's user tables?
Both installs are working on the same user/pass, just different tables. In the projects install I've added a line in conf/database.php to allow me to reference the root install database
But I don't know where else to change so that the USER_DATABASE_NAME is referenced.
Any help you can offer is much appreciated.
I have a vanilla install in my root directory and an additional install outfitted with Jazzman's Issue Tracker in a subdirectory "projects". Currently I'm manually mirroring the User database tables to allow a single login to work with both installs, which is highly annoying and time consuming whenever i get a new user or someone changes their information. Is there a way that I can redirect the projects install to point to the root directory's user tables?
Both installs are working on the same user/pass, just different tables. In the projects install I've added a line in conf/database.php to allow me to reference the root install database
$Configuration['DATABASE_NAME'] = 'database1_issuedb';
// For integration of main forum user database
$Configuration['USER_DATABASE_NAME'] = 'database1_rootdb';
But I don't know where else to change so that the USER_DATABASE_NAME is referenced.
Any help you can offer is much appreciated.
0
This discussion has been closed.
Comments
I've migrated my "projects" database over to my root install database. All the "projects" tables are prefixed with IST_
Everything works until i try to integrate it into my root User tables (prefixed with LUM_)
I have my conf/database.php line
$Configuration['DATABASE_TABLE_PREFIX'] = 'IST_';
to point to the tables, but it's looking for IST_User as well. All of the documentation and discussions i've found say that the User table doesn't reference this variable, but it seems to be doing so in my case.Can anyone point me in the right direction? I've tried commenting out that line in my conf/database.php file and it goes straight back to LUM_
appg/database.php defines the user table:
$DatabaseTables['User'] = 'LUM_User'
Even looking in there you can see that all other table definitions don't have the prefix... And it shouldn't be looking for a IST_User unless you set $DatabaseTables['User'] = 'IST_User'
If I try to go directly to the subfolder - I can get the sign-in form, but when submitted i get this:
Error Message An error occurred while attempting to validate your credentials Affected Elements Authenticator.Authenticate(); The error occurred on or near: Table 'vanilla_db.IST_User' doesn't exist
If I login through the root and navigate to the subfolder i get this:
Error Message An error occurred while attempting to retrieve the requested user. Affected Elements UserManager.GetSessionDataById(); The error occurred on or near: Table 'vanilla_db.IST_User' doesn't exist
I've deleted cookies (path, domain and session) cleared my cache and restarted firefox...any suggestions?There may be more places to fix this, but we'll try fixing the login first. Go into library/people/People.Class.Authenticator.php and change this line, adding the underlined: And then repeat your login test with $DatabaseTables['User'] set to 'LUM_User'.
$DatabaseTables['User'] = 'LUM_User'
code doesn't like is LUM_ I can change it to BLAH or FOO or whatever and it reads correctly. When it's LUM_ it defaults back to IST_ which is how my other tables are defined.
As far as my reading code... I was wrong about where the prefix gets added... I thought it was supposed to be handled in the authenticator itself, but it looks like the prefix is added to the table names in Framework.Functions.php, the GetTableName function, which is called from the SqlBuilder
Thinking differently, is there a way for a new user to be added to both tables upon registration? Not really the cleanest solution.
Style preference info is kept in the User table and since my two installs use separate styles, I can't use a common table unless I rename the two styles to the same thing, which will be confusing in the future for updates.
Thoughts?
the issue is to have the tracker to handle this new roles instead of the standard 'Role' column in the user table...maybe swapping its values when you are on either site so the current role will always be in the 'Role' column, but you have like a backup value thats the user role for the other site. The problem here is that then the user couldn't visit both sites at the same time...
I hope I wasn't too confusing, i don't know, it's just fast idea