function doAction() { if (isset($_POST['logout'])) { unset($_SESSION['cid']); AuthCookie::destroyAuthentication(); $this->result = 'unlogged'; } }
function doAction (){ //if parameters are set if(!empty($this->login) or !empty($this->pass) and !isset($_POST['logout']) and !isset($_POST['reset'])){ //check login $this->doLogin(); } if(isset($_POST['logout'])){ unset($_SESSION['cid']); AuthCookie::destroyAuthentication(); $this->result='unlogged'; } if(isset($_POST['reset'])){ $outcome=sendResetLink($this->login); if($outcome) $this->result='sent'; } }