Dear all,

When a user logins, the controller calls the following function in the myUser.class. The problem is, if he doesn't logout but then logins in another computer/browser, the old session does not get killed. I tried to use setAuthenticated(false) on users who have already authenticated, hoping that his old session will get killed before he gets a new one. But it doesn't work.

Many thanks to you all.

// Viewable in http://pastebin.com/f765fff66

public function login($loginId,$pwd){

       $member=MemberPeer::getByLoginIdAndPassword($loginId,$pwd);

       if(!is_null($member)) {

          if($this->isAuthenticated())
$this->setAuthenticated(false); // I would like to logout the user if he/she already has a session, but it doesn't work

           $this->setAuthenticated(true);
           $member->setLastLoginAt(time());
           $member->save();
           $this->setAttribute('member_id', $member->getMemberId());

           return true;
       }
       return false;
}
--
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