Example #1
0
 public function index()
 {
     auth::logout();
     if ($continue_url = Input::instance()->get("continue")) {
         $item = url::get_item_from_uri($continue_url);
         if (access::can("view", $item)) {
             // Don't use url::redirect() because it'll call url::site() and munge the continue url.
             header("Location: {$continue_url}");
         } else {
             url::redirect(item::root()->abs_url());
         }
     }
 }
Example #2
0
 public function index()
 {
     access::verify_csrf();
     $user = user::active();
     user::logout();
     log::info("user", t("User %name logged out", array("name" => p::clean($user->name))), html::anchor("user/{$user->id}", p::clean($user->name)));
     if ($this->input->get("continue")) {
         $item = url::get_item_from_uri($this->input->get("continue"));
         if (access::can("view", $item)) {
             url::redirect($this->input->get("continue"));
         } else {
             url::redirect("");
         }
     }
 }
Example #3
0
 public function index()
 {
     //access::verify_csrf();
     $user = user::active();
     user::logout();
     log::info("user", t("User %name logged out", array("name" => p::clean($user->name))), html::anchor("user/{$user->id}", p::clean($user->name)));
     if ($continue_url = $this->input->get("continue")) {
         $item = url::get_item_from_uri($continue_url);
         if (access::can("view", $item)) {
             // Don't use url::redirect() because it'll call url::site() and munge the continue url.
             header("Location: {$continue_url}");
         } else {
             url::redirect("albums/1");
         }
     }
 }