diff options
Diffstat (limited to 'app/services/users/build_service.rb')
-rw-r--r-- | app/services/users/build_service.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/users/build_service.rb b/app/services/users/build_service.rb index ea4d11e728e..d18f20bc1db 100644 --- a/app/services/users/build_service.rb +++ b/app/services/users/build_service.rb @@ -86,6 +86,8 @@ module Users :email_confirmation, :password_automatically_set, :name, + :first_name, + :last_name, :password, :username ] @@ -107,6 +109,12 @@ module Users if user_params[:skip_confirmation].nil? user_params[:skip_confirmation] = skip_user_confirmation_email_from_setting end + + fallback_name = "#{user_params[:first_name]} #{user_params[:last_name]}" + + if user_params[:name].blank? && fallback_name.present? + user_params = user_params.merge(name: fallback_name) + end end if user_default_internal_regex_enabled? && !user_params.key?(:external) |