diff options
| author | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-22 08:38:06 +0200 |
|---|---|---|
| committer | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-22 08:38:06 +0200 |
| commit | 317b7b98c094386407251c2baf8f6e7c391c7bff (patch) | |
| tree | 98898d791df3a10cf6f9c1c62fbce06d8c9a7de1 /modules/user/controllers | |
| parent | 00b3ca82de3a4858745988943a46d07b1c0fd006 (diff) | |
| parent | f533aee1cc71e8db739406859ac0cf43dce030ec (diff) | |
Merge commit 'upstream/master'
Diffstat (limited to 'modules/user/controllers')
| -rw-r--r-- | modules/user/controllers/logout.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/user/controllers/logout.php b/modules/user/controllers/logout.php index 63971789..099b1952 100644 --- a/modules/user/controllers/logout.php +++ b/modules/user/controllers/logout.php @@ -19,18 +19,19 @@ */ class Logout_Controller extends Controller { public function index() { - access::verify_csrf(); + //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 ($continue_url = $this->input->get("continue")) { + $item = url::get_item_from_uri($continue_url); if (access::can("view", $item)) { - url::redirect($this->input->get("continue")); + // Don't use url::redirect() because it'll call url::site() and munge the continue url. + header("Location: $continue_url"); } else { - url::redirect(""); + url::redirect("albums/1"); } } } |
