public function view() { $v = View::getInstance(); $c = $v->getCollectionObject(); if (is_object($c)) { $cID = $c->getCollectionID(); if($cID) { $this->forward($cID); // set the intended url } } parent::view(); $this->render('/login'); }
public function view() { $v = View::getInstance(); $c = $v->getCollectionObject(); if (is_object($c)) { $cID = $c->getCollectionID(); if ($cID) { $this->forward($cID); // set the intended url } } parent::view(); $u = new User(); $logged = $u->isLoggedIn(); if (!$logged && FORBIDDEN_SHOW_LOGIN) { //if they are not logged in, and we show guests the login... $this->render('/login'); } }