Checks if passwords are allowed before setting it for the user.