This is most likely caused by the fact that when the user is disabled, the code does not check whether the user is already disabled or not.