authenticateUser(); $go = $this->getParam('go'); // if authentication is successfull if ($status['auth_status'] == true) { if (!empty($go)) { // redirect to url if present $url = urldecode($go); $this->e->debug("redirecting browser to...:". $url); owa_lib::redirectBrowser($url); } else { //else redirect to home page // these need to be unset as they were set previously by the doAction method. // need to refactor this out. $this->set('auth_status', ''); $this->set('params', ''); $this->set('site_id', ''); $this->setRedirectAction($this->config['start_page']); } } else { // return login form with error msg $this->setView('base.loginForm'); $this->set('go', $go); $this->set('error_code', 2002); $this->set('user_id', $this->getParam('user_id')); } } } ?>