Commit a8522050 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '25678-remove-user-build' into 'master'

Remove unnecessary method `build_user` from model `User` 

Closes #25678

See merge request !8162
parents ca7e746b 3cc334ea
...@@ -311,10 +311,6 @@ class User < ActiveRecord::Base ...@@ -311,10 +311,6 @@ class User < ActiveRecord::Base
find_by(id: Key.unscoped.select(:user_id).where(id: key_id)) find_by(id: Key.unscoped.select(:user_id).where(id: key_id))
end end
def build_user(attrs = {})
User.new(attrs)
end
def reference_prefix def reference_prefix
'@' '@'
end end
......
---
title: remove build_user
merge_request: 8162
author: Arsenev Vladislav
...@@ -94,7 +94,7 @@ module API ...@@ -94,7 +94,7 @@ module API
identity_attrs = params.slice(:provider, :extern_uid) identity_attrs = params.slice(:provider, :extern_uid)
confirm = params.delete(:confirm) confirm = params.delete(:confirm)
user = User.build_user(declared_params(include_missing: false)) user = User.new(declared_params(include_missing: false))
user.skip_confirmation! unless confirm user.skip_confirmation! unless confirm
if identity_attrs.any? if identity_attrs.any?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment