Ok, I found out the problem. My problem is that I'm giving credentials to anonymous users. So, despite the users have credentials at session, they are unable to use credentials since they aren't authenticated.
Now I just learn why we have user atributes functions for :) Regards, Artur Martins On Sep 8, 1:49 pm, Artur Martins <[email protected]> wrote: > I'm having problems to verify existing credentials. The code is very > simple: > > $sfUser = sfContext::getInstance()->getUser(); > $C = 'student' > $sfUser->addCredential($C); > var_dump ($sfUser->hasCredential($C)); # returns bool(false) > print_r($sfUser); # dumps the object > > myUser Object > ( > [user:protected] => > [lastRequest:protected] => 1252413392 > [credentials:protected] => Array > ( > [0] => student > ) > > ... > > I'm using symfony 1.2.8. and myUser class is a empty subclass of > sfGuardSecurityUser. > > It's something wrong at my code, or I found a bug? > > Regards, > Artur Martins --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
