Jump to:

22972 Posts in 11596 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » $LoginForm in SS3.x

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: 292 Views
  • Andre
    Avatar
    Community Member
    125 Posts

    $LoginForm in SS3.x Link to this post

    Hi there, I have a short question ragarding the $LoginForm Variable within the Template of SS3.x

    On 2.4.x I was able, to set this Variable somewhere within the Template and add the "LoginForm" to the allowed_actions within Page_Controller (Page.php).
    The Loginform then appeared on every Page, that wass including the Template with the Variable.
    When Using the Loginform and submitting some wrong Data from anywhere else other than /Security/login, I get automatically rediected to /Security/login, which then shows the LoginForm pre populated with my wrong credentials and the correct Error Message.
    Instead, when I enter correct credentials from any Page, I get logged in and stay on this Page.

    This is a very nice behaviour, which seems to be gone (or changed) on SS3.x

    On SS3.x for my Test, I have put the $LoginForm Variable under $Content.
    Now (on a plain SS3.x installation) I open for example the "about-us" Page and fill the LoginForm with the correct credentials. Then I got logged in and am still on the about-us Page.
    When I try to use some wrong credentials, I do not get directed to /Security/login (like in SS2.4.x), instead I get directed to "Page not Found".
    Similar Problem appears, when pressing the "Login as someone else" Button. Then I only see a blank Page (with the following URL http://ss30.test2.local/page-not-found/LoginForm for example).

    Anyone any Idea, how to reimplement the previous feature from SS2.4.x? Or was this removed because of some Security Issues?

    regards

    andre

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