This is an old version of this answer!
Return to the current answerHi,
Just call the sfGuardSecurityUser::signIn with an extra parameter :
For more details, see sfGuardPlugin code source :
http://trac.symfony-project.org/browser/plugins/sfGuardPlugin/branches/1.3/lib/user/sfGuardSecurityUser.class.php#L78
Julien
Just call the sfGuardSecurityUser::signIn with an extra parameter :
$user = sfGuardUserPeer::retrieveByUsername($email);
// Please note the use of "instanceof" in the condition
if ( $user instanceof sfGuardUser )
{
$this->getUser()->signin( $user, true ); // TRUE means "remember me"
$this->setFlash('notice', 'You are logged in');
$this->forward('user', 'home');
return sfView::SUCCESS;
}
For more details, see sfGuardPlugin code source :
http://trac.symfony-project.org/browser/plugins/sfGuardPlugin/branches/1.3/lib/user/sfGuardSecurityUser.class.php#L78
Julien
JuG | 07/27/10 at 2:06am
