public static function clearSession() {
    $user = self::$currentUser;
    self::$currentUser = null;
    if (isset(self::$serverTimezone)) {
      date_default_timezone_set(self::$serverTimezone);
    }
    if ($user) {
      $user->updateDataProtection();
    }
  }
public static function clearSession() {
    $user = self::$currentUser;
    self::$currentUser = null;
    if (isset(self::$serverTimezone)) {
      date_default_timezone_set(self::$serverTimezone);
    }
    if ($user) {
      $user->updateDataProtection();
    }
  }
public static function clearSession ( ) { $ user = self :: $ currentUser ; self :: $ currentUser = null ; if ( isset ( self :: $ serverTimezone ) ) { date_default_timezone_set ( self :: $ serverTimezone ) ; } if ( $ user ) { $ user -> updateDataProtection ( ) ; } }
Clear session user data.

Also sets the default timezone to the server default.
Clear session user data .