Jump to:

23001 Posts in 11702 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » Frontend user managment

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: 2134 Views
  • Bambii7
    Avatar
    Community Member
    254 Posts

    Frontend user managment Link to this post

    Hi Silverstripe!
    Mmmmmmmmm I'm loving it.

    Any way I've been using Joomla for the last few years, and slowly but surely converting to the amazing home grown CMS. Being noob I'm having trouble finding info on controlling access to published pages. I've almost finished a site for the Takapuna Business Association, but need to get a front end login form happening, this form is only for the members of the association where they can keep records of meetings and other very very fascinating stuff. Can someone point me in the right direction on some documentation? I've read a few posts in the archive but most of them didn't have any links to documentation. I really have been trying to find info, honest. Help or pointers would be much appreciated.

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Frontend user managment Link to this post

    You can manage frontend user management within the 'Access' tab in the content editor window in the CMS. In this tab you can set who can view the page.

    It will then prompt users to enter a username / password to view that page and it will also check they have permission to view that page. You can manage the users / groups in the Security section of the CMS.

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: Frontend user managment Link to this post

    Cheers for the reply Willr, I shall have a play with that.
    I was hoping for a solution to hide the menu items from users who weren't logged in. But I should be able to manipulate it some how if it doesn't do it already. I'm just used to Joomla's user groups. Although I like Joomla, SS is so much easier to use and understand with the backend interface. Clients are also less intimidated by it, + it's a little late to be switching.

    You wouldn't by chance know where some info is on this, maybe in the wiki? I've failed to find what I was after.

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Frontend user managment Link to this post

    Im pretty sure this is a feature out of the Box, I thought it did it automatically but since it doesn't I believe you can call canView on the page so in your menu code you probably have something like

    <% control Menu(1) %>
    <a href="$Link">$MenuTitle</a>
    <% end_control %>

    Try using canView which should return true, false based on if the user can view the page.

    <% control Menu(1) %>
    <% if canView %>
    <a href="$Link">$MenuTitle</a>
    <% end_if %>
    <% end_control %>

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: Frontend user managment Link to this post

    YUS!!
    You're right willr.

    <% if CurrentMember %>

    <h3>Hi $CurrentMember.FirstName <a href="/Security/logout">(logout?)</a></h3>

    <% else %>

    <form action="Security/?executeForm=LoginForm" method="post" enctype="application/x-www-form-urlencoded">
    <input class="hidden" type="hidden" name="AuthenticationMethod" value="MemberAuthenticator" />
    <p>email:</p>
    <input class="text" type="text" name="Email" value="" />
    <p>password:</p>
    <input class="text" type="password" name="Password" value="" />
    <input class="hidden" type="hidden" name="BackURL" value="/$URLSegment" />
    <input class="action" type="submit" name="action_dologin" value="Log in" />
    </form>

    <% end_if %>

    And using $URLSegment as the return URL gives a login for that can site on the bottom of every page.

    Thanks a bunch for help, I was struggling.

  • Bureau Berg
    Avatar
    Community Member
    7 Posts

    Re: Frontend user managment Link to this post

    Hello there,

    I am trying with same HTML "Login Form" you have mentioned above. But when I press on login button it is giving me blank page. And URL go to http://domain.com/Security/?executeForm=LoginForm.

    Please guide me.

    Thanks,
    Kumar Sekhar

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