original_string: public static function resetUserIdentity(AUser $user = NULL, $duration = null) {
          static::$userId = new UserIdentity($user, $duration);
          if (!$user)
              Session::reset();
          static::saveSession();
      }
code: public static function resetUserIdentity(AUser $user = NULL, $duration = null) {
          static::$userId = new UserIdentity($user, $duration);
          if (!$user)
              Session::reset();
          static::saveSession();
      }
code_tokens: public static function resetUserIdentity ( AUser $ user = NULL , $ duration = null ) { static :: $ userId = new UserIdentity ( $ user , $ duration ) ; if ( ! $ user ) Session :: reset ( ) ; static :: saveSession ( ) ; }
docstring: Resets the user to guest
  @param AUser $user
  @param int $duration Duration for which the identity should be valid
docstring_tokens: Resets the user to guest