Changed $userId type to int