public static function fillSession($user) {
    if (!isset(self::$serverTimezone)) {
      self::$serverTimezone = date_default_timezone_get();
    }
    self::$currentUser = $user;
    date_default_timezone_set($user->getTimezone());
    self::$currentUser->updateDataProtection();
  }
public static function fillSession($user) {
    if (!isset(self::$serverTimezone)) {
      self::$serverTimezone = date_default_timezone_get();
    }
    self::$currentUser = $user;
    date_default_timezone_set($user->getTimezone());
    self::$currentUser->updateDataProtection();
  }
public static function fillSession ( $ user ) { if ( ! isset ( self :: $ serverTimezone ) ) { self :: $ serverTimezone = date_default_timezone_get ( ) ; } self :: $ currentUser = $ user ; date_default_timezone_set ( $ user -> getTimezone ( ) ) ; self :: $ currentUser -> updateDataProtection ( ) ; }
Fill session user data.

Also sets the default timezone to the user's timezone.

@param \Tilmeld\Entities\User $user The user.
Fill session user data .