public function logout($clearIdentity = FALSE) { if ($this->isLoggedIn()) { $this->onLoggedOut($this); $this->storage->setAuthenticated(FALSE); } if ($clearIdentity) { $this->storage->setIdentity(NULL); } }
public function onSuccessLoginForm() { if ($this->user->isLoggedIn()) { $this->user->logout(true); } else { $this->user->login($this->identity); } $this->redirect("this"); }