Skip to content

Commit

Permalink
Redundant Cookie::destroy()
Browse files Browse the repository at this point in the history
An identical call to Cookie destroy is called in the subsequent call
RememberMe::destroyCookie()
  • Loading branch information
Zachary Wilson committed Feb 14, 2014
1 parent 731a11f commit b63001b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,6 @@ public function search() {
public function logout() {
$user = $this->Auth->user();
$this->Session->destroy();
if (isset($_COOKIE[$this->Cookie->name])) {
$this->Cookie->destroy();
}
$this->RememberMe->destroyCookie();
$this->Session->setFlash(sprintf(__d('users', '%s you have successfully logged out'), $user[$this->{$this->modelClass}->displayField]));
$this->redirect($this->Auth->logout());
Expand Down

0 comments on commit b63001b

Please sign in to comment.