OR Problem in authorize_check_query