Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

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

Login as someone else - Error: Passed invalid authentication method

Go to End

3 Posts   2580 Views


Community Member, 81 Posts

4 June 2009 at 8:01pm

Hi Guys,
When I press the button "log in as someone else", I get the following error. Please assist with resolving the issue. I am currently using SS 2.3 for the website I am constructing. Thanks

[User Error] Passed invalid authentication method
POST /websiteX/Security/LoginForm

Line 215 in F:\xampp\htdocs\websiteX\sapphire\security\Security.php


Community Member, 81 Posts

4 June 2009 at 8:17pm

I figured out a solution. In sapphire/Security/MemberLoginForm.php you need to edit line 57

change from:

$actions = new FieldSet(new FormAction("logout", _t('Member.BUTTONLOGINOTHER', "Log in as someone else")));

to the following:

$actions = new FieldSet(new HiddenField("AuthenticationMethod", null, $this->authenticator_class, $this),
new FormAction("logout", _t('Member.BUTTONLOGINOTHER', "Log in as someone else"))

If someone can put this on the ticketing system as a fault that would be great otherwise I will do so when I get around to it sometime. Hope this solution helps anyone that was having the same issue.


Community Member, 33 Posts

13 June 2009 at 7:49am

I had the same problem recently, on a custom template. But I realised that I didn't have <% base_tag %> in my <head> on the template

Seemed to go away when I added this