'Configures a user after creation and returns the updated user.
By default, returns the user with his attributes updated.'

def configure_user(self, user, attributes, attribute_mapping):

    user.set_unusable_password()
    return self.update_user(user, attributes, attribute_mapping, force_save=True)
