public function login($redirectTo) { $roles = func_get_args(); array_shift($roles); $this->authenticate($roles[0]); if (($c = count($roles)) > 1) { for ($i = 1; $i < $c; $i++) { $this->addRole($roles[$i]); } } if ($response = Sabel_Context::getResponse()) { $backUri = null; if ($request = Sabel_Context::getRequest()) { $backUri = $request->getValueWithMethod("back_uri"); } if ($backUri === null) { $response->getRedirector()->to($redirectTo); } else { l("ACL: back to the page before authentication.", SBL_LOG_DEBUG); $response->getRedirector()->uri($backUri); } } $this->remove("login_uri"); $this->remove("back_uri"); }