Jump to:

23457 Posts in 18905 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » User Login in Frontend

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

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

Page: 1
Go to End
Author Topic: 2812 Views
  • hatimgenius
    Avatar
    Community Member
    1 Post

    User Login in Frontend Link to this post

    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

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: User Login in Frontend Link to this post

    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.

  • TerryMiddleton
    Avatar
    Community Member
    108 Posts

    Re: User Login in Frontend Link to this post

    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

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: User Login in Frontend Link to this post

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

    Silverstripe deals with the rest

  • TerryMiddleton
    Avatar
    Community Member
    108 Posts

    Re: User Login in Frontend Link to this post

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

    My apologies.

    Terry

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: User Login in Frontend Link to this post

    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.

  • TerryMiddleton
    Avatar
    Community Member
    108 Posts

    Re: User Login in Frontend Link to this post

    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

    2812 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.