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