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

User Login in Frontend


Go to End


10 Posts   8065 Views

Avatar
hatimgenius

Community Member, 1 Post

21 February 2009 at 2:44am

Hello,
I want two fields of username and password on frontend of my site so that the people who has username and password can only access some pages which can't be shown on site. When user Logs in the site he can access some pages where some files are upload anyone else can't access, can anyone help me in this regard? I dont want user registration no body will register on site only access to pages which i want to. Please if some one knows kindly tell.
Thanks

Avatar
Carbon Crayon

Community Member, 598 Posts

21 February 2009 at 5:04am

Hi Harimgenius, welcome to Silverstripe :)

Just create a new user group in the security section and then a new user with the username and password you want people to use, then under the 'access' tab on the pages in question set the 'can be viewed by' to 'only these people' and choose your new group from the dropdown. Users will then be asked to login when they try to access that page.

Avatar
TerryMiddleton

Community Member, 108 Posts

30 March 2009 at 12:47pm

This is an excellent thing. Now, I need to ask. How do you get the user to login to the site and have the session(or cookie) know they are logged in?

This is my quest.

Terry

Avatar
Carbon Crayon

Community Member, 598 Posts

30 March 2009 at 12:55pm

Well to login you just go to www.yoursite.com/Security/login

Silverstripe deals with the rest

Avatar
TerryMiddleton

Community Member, 108 Posts

30 March 2009 at 12:58pm

Oh yeah...I'm sorry. I was looking a login for the site and not the CMS.

My apologies.

Terry

Avatar
Carbon Crayon

Community Member, 598 Posts

30 March 2009 at 1:05pm

It's the same login form. If you are on your way to the CMS (i.e. you jsut typed /admin) then it will redirect you there, but if you were on yourway to a password protected area then it would redirect you to that instead.

Avatar
TerryMiddleton

Community Member, 108 Posts

30 March 2009 at 3:13pm

Really, so I can set the login access in the CMS. That means there is a table with all the users.

I have an external table of authorized users that will get checked before allowing into certain pages.

This is very helpful. Thank you.

Terry

Avatar
mhdesign

Community Member, 216 Posts

10 August 2016 at 11:00am

Looking for a way to do this same thing. I've set up an Authorised User account but when I try to log into this account I get the following message:

I'm sorry, but you can't access that part of the CMS. If you want to log in as someone else, do so below

Did I do something wrong?

Go to Top