def prepare(attributes): attributes_copy = copy.deepcopy(attributes) attributes_copy['password'] = Auth.hash_password(attributes['password']) attributes_copy['email'] = attributes['email'].lower() attributes_copy['permissionLevel'] = Auth.GHOST if config[ 'ENABLE_ACCOUNT_APPROVALS'] else Auth.USER return attributes_copy
def prepare(attributes): attributes_copy = copy.deepcopy(attributes) attributes_copy['password'] = Auth.hash_password(attributes['password']) attributes_copy['email'] = attributes['email'].lower() attributes_copy['permissionLevel'] = Auth.GHOST if config['ENABLE_ACCOUNT_APPROVALS'] else Auth.USER return attributes_copy