diff options
author | Rémy Coutable <remy@rymai.me> | 2018-10-22 13:37:05 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-11-13 15:24:53 +0300 |
commit | 1f0502df0a2759a9bdde3837bb57c667d3fa3c56 (patch) | |
tree | 678ecb7f392a6a0d865debc4f8e2e5b872fe881b /app | |
parent | f2ef5e2ee8ae46d324e4136dbc95ea40d1f21841 (diff) |
Fix a bug where internal email pattern wasn't respected
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app')
-rw-r--r-- | app/services/users/build_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/users/build_service.rb b/app/services/users/build_service.rb index de6ff92d1da..24ac20fdd29 100644 --- a/app/services/users/build_service.rb +++ b/app/services/users/build_service.rb @@ -95,10 +95,6 @@ module Users if params[:reset_password] user_params.merge!(force_random_password: true, password_expires_at: nil) end - - if user_default_internal_regex_enabled? && !user_params.key?(:external) - user_params[:external] = user_external? - end else allowed_signup_params = signup_params allowed_signup_params << :skip_confirmation if skip_authorization @@ -109,6 +105,10 @@ module Users end end + if user_default_internal_regex_enabled? && !user_params.key?(:external) + user_params[:external] = user_external? + end + user_params end |