5412 Posts in 1649 Topics by 1188 members
|Go to End|
29 January 2013 at 4:17am Last edited: 29 January 2013 4:17am
In the wake of my previous efforts to internationalize the login page, I am now trying to extend the MemberAuthenticator class with a custom class.
The reason I'm trying to do that is that despite my aforementioned efforts, error messages still appear in en_US when the page is normally in fr_FR. To solve that problem, I've realized that I need to add a call to i18n::set_locale() in the static function MemberAuthenticator::authenticate.
I have created a subclass to MemberAuthenticator that does just that, added
in mysite/_config.php, and run /dev/build.
And yet, using XDebug and Eclipse, I see that the standard MemberAuthenticator still gets called in lieu of my custom class, the file of which I've dropped in mysite/code/security/MyMemberAuthenticator.php. Is there something I did wrong?
21 February 2013 at 5:20pm
I had the same issue. Solution is to create your own security controller for an instance "SecurityExtended" and rewrite Director rules by routes.yml
Here's an example:
12 April 2013 at 11:42am
Thanks Tony Air can You Please Explain How to extend the security controller and change it sorry I am a new bee to silver stripe.
I am finding harder to extend the internal classes and use it. Or if you can provide me link.
|Go to Top|