Example #1
0
File: User.php Project: eix/core
 /**
  * Flag the user as no longer in existence, so that it does not
  * automatically get saved in the session.
  */
 public function destroy()
 {
     parent::destroy();
     Logger::get()->debug('Destroying user ' . $this->id);
     // If this user is the one stored in the session, destroy that too.
     if (!empty($_SESSION) && $_SESSION['current_user'] == $this) {
         unset($_SESSION['current_user']);
     }
 }