public function index() { // this is bit of a kludge in that since we are logging out, we don't want to make the template // ready, until AFTER the logout has occurred otherwise, menu options will still be created and displayed // as though the user is still logged in.... because technically he would be at that point. $mgr = new v6_manager(); $mgr->logout(); // now we can do everything we normally do... appMakeTemplateReady($this->template); $this->template->message = 'You have been logged out'; $this->template->show('login.form'); }
public function index() { // if they click on signup, make sure they aren't logged in // this is bit of a kludge in that since we are logging out, we don't want to make the template // ready, until AFTER the logout has occurred otherwise, menu options will still be created and displayed // as though the user is still logged in.... because technically he would be at that point. $mgr = new v6_manager(); $mgr->logout(); // now we can do everything we normally do... appMakeTemplateReady($this->template); // this test is so the url doesn't get funky... // ie: if you come here as a get, then the form is shown and if you come here as a post, I try to authenticate you if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->_process(); } else { $this->template->mgr->logout(); // if they are logging in, then make sure they are logged out as of now $this->template->show('signup.form'); } }