Page 1 of 1

quick multisite hack question? (2 databases / 1 user table)

Posted: Tue Oct 02, 2007 2:09 pm
by dazbaz
Hi all,

I have read up abit about people's multisite ideas and questions, and understand that its quite complex and maybe a little off in the future, thus here's a quick question for all you CMSMS experts.

Here's my ultimate scenario that I would like to achieve:
I have 2 CMSMS sites that run on my server...
  • domain.com/site1
  • domain.com/site2
Now, each site runs off its own database, "site1_" and "site2_".

Ideally it would nice if a user was logged into "domain.com/site1" admin panel, and at the users choice, could do a quick switch to "domain.com/site2" admin panel without having to re-login. Eg. the user stays in session.

So I guess what I'm getting at is "site1_" database stores all the user info, and when a user tries to log into either admin panel, it just checks the "site1_" db. And... also keeps the user in session no matter what cms admin panel they're in (until the log out from either)


Hope that makes sense?

It it a relatively easy and possible thing to achieve.

I'd say I'm intermediate when it comes to navigating around the CMSMS config files, and up for a little challenge. But thought I'd get some thoughts from fellow CMSMS's...  ;)

Thanks,

DAZZ

Re: quick multisite hack question? (2 databases / 1 user table)

Posted: Tue Oct 02, 2007 2:28 pm
by calguy1000
No it's not that easy to acchieve, you would have to open up another database connection, and read the other site's config file to figure out how.

That's why we've decided that real multisite support with CMS is out of scope.  There's just too many permutations, combinations of ways people would like it to work, and it would result in taking the 'SIMPLE' out of cms made simple.

CMS Made Simple 2.0 will support openid so that will get you 1/2 of the way to what you want, but 2.0 is a work in progress at the moment.

Re: quick multisite hack question? (2 databases / 1 user table)

Posted: Tue Oct 02, 2007 10:27 pm
by dazbaz
Thanks for the quick reply.

Yes, I see the complexity now :)

I may be missing the point, and this maybe opening a bit of a security hole, but how does this sound?

2 DB's (1 for each site) and each site authenticates users off its own "user" table. (Both user tables will have the same data in it, eg. same usernames and passwords)

Now if a user wishes to switch to the other CMS, it logs them out of the 1st CMS, and does an auto-login of the 2nd CMS, based on checking data in the session before it logs out of the 1st CMS?

Thus, to the user, it looks like a clean switch.

Both CMS's will only have 3 users, and if new users need to be added, they will be added by myself.

Thanks

DAZZ