def check_user(user):
 if user.is_disabled:
  raise DeactivatedAccountError
 elif (not user.is_confirmed):
  raise UnconfirmedAccountError

def check_user ( user ) : if user . is_disabled : raise DeactivatedAccountError elif ( not user . is_confirmed ) : raise UnconfirmedAccountError
checks that the user is neither unconfirmed nor disabled .