Jump to:

1970 Posts in 1275 Topics by 607 members

Form Questions

SilverStripe Forums » Form Questions » Question about LoginForm

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

Page: 1
Go to End
Author Topic: 767 Views
  • _Vince
    Avatar
    Community Member
    156 Posts

    Question about LoginForm Link to this post

    I have a group of users that should just be allowed to view some password protected pages.

    They're not supposed to access the CMS itself in any way.

    I have put these users in a group with no rights and I have set the hidden pages' access stuff in the CMS to say that only Admins and that group can view those pages, and only Admins can edit the pages.

    I've created a Page class with a $LoginForm in the template.

    But when I use the $LoginForm to log in as one of those users, the form tries to open the CMS, the form says that the user can't access this part of the CMS and the hidden pages aren't displayed either.

    I know the user has logged in because the message is in Catalan, an interface language I chose arbitrarily for them

    What I would like to know is:

    how do I have those users log in and be either redirected to the site's home page (or some page on the site) without trying to open the CMS and

    what am I doing wrong with the access rights for the pages. I thought an F5 would display the hidden pages but they don't get displayed at all.

  • _Vince
    Avatar
    Community Member
    156 Posts

    Re: Question about LoginForm Link to this post

    Anybody..?

  • Pigeon
    Avatar
    Community Member
    243 Posts

    Re: Question about LoginForm Link to this post

    It appears that your loginform seems to be sending the user to /admin

    If you use the CMS to assign access rights to specific pages, there shouldnt be any need for you to write your own loginform into the page. SS will automatically handle the authentication for you.

  • _Vince
    Avatar
    Community Member
    156 Posts

    Re: Question about LoginForm Link to this post

    Well, yeah, you'd think so, but the LoginForm seems to always attempt to let people into the CMS once they've logged in.

    In the end, I found a recipe for a custom login form and wrote something like it, redirecting people to different pages depening on their user group.

    Thanks for the reply, though. (:

    767 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.