delete() public static method

This overwrites the spoon cookie method and adds the same functionality as in the set method to automatically set the domain.
public static delete ( )
Beispiel #1
0
 /**
  * Logout a profile.
  */
 public static function logout()
 {
     // delete session records
     FrontendModel::getContainer()->get('database')->delete('profiles_sessions', 'session_id = ?', array(\SpoonSession::getSessionId()));
     // set is_logged_in to false
     \SpoonSession::set('frontend_profile_logged_in', false);
     // delete cookie
     CommonCookie::delete('frontend_profile_secret_key');
 }