Thanks Guillermo!

That was so simple, I feel a bit stupid

Guillermo Rauch wrote:

On May 14, 2008, at 9:25 PM, GuyMontréal wrote:

Hello all!

I am running into this problem, and still doesn't get it :

I've made an authentication form and action function similar to the
ones shown in the askeet projet. When user provides proper login info,
I set :

$this->getUser()->setAuthenticated(true);

and I get an [sfException] error : "Call to undefined method
sfUser::setAuthenticated"

Indeed, sfUser::setAuthenticated does not exist! setAuthenticated is a method of sfBasicSecurityUser.
I think you're forgetting to extend that class.

Make sure your user class (for example, myUser), extends it like this:

class myUser extends sfBasicSecurityUser

Or for the matter any other user class that implements the setAuthenticated method, like sfGuardSecurityUser if you're using sfGuardAuth.

Good luck and always remember to understand what PHP tells you.

Guillermo Rauch



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to