MDL-40358 Enrolments: Fixed sql when user is suspended