Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

1 SS installation but multiple user databases


Go to End


3 Posts   2400 Views

Avatar
raamklaza

Community Member, 182 Posts

27 August 2010 at 2:29am

Hello everyone,

I want to use silverstripe for some form of webapplication.

I want users to be able to login and the can use the files i made from a master silverstripe installation.

So each user can access the pages and store date online. The tric here is that every user has his / her own database.

There will be only one cms which can be altered by me. The frontpage, where information is stored, is accessible by everyone who logs in.

So pages will look like this:

CMS
Contains page 1, page 2, page 3, etc

User 1
page 1: shows user 1 information stored in database
page 2: shows user 1 information stored in database
page 3: shows user 1 information stored in database

User 2
page 1: shows user 2 information stored in database
page 2: shows user 2 information stored in database
page 3: shows user 2 information stored in database

User 3
page 1: shows user 3 information stored in database
page 2: shows user 3 information stored in database
page 3: shows user 3 information stored in database

I hope i made my wish clear.

Does something like this exists already?

Avatar
Willr

Forum Moderator, 5523 Posts

27 August 2010 at 9:24am

Not sure if your question is clear or whether I'm not reading it correctly but you can access the the current member details in the template using $CurrentMember or in the PHP using Member::currentUser(); Either one gets you the currently logged user so you could change your code to use the ID of the member to show / hide information.

Avatar
Mo

Community Member, 541 Posts

1 September 2010 at 10:00am

I am not entirely sure what you mean either. To me it sounds like you want to extend the profile information provided by the member class, and display that across several different pages. So each user has unique information that is only available to them, and perhaps people they have shared that info with?

If that is the case, then simply extending the Member class, then using $CurrentMember in your template should do everything you need.

Cheers,

Mo