diff --git a/CHANGELOG b/CHANGELOG index db3e5744b0e2c31320688ae1b925ab87f05f497c..7d2edfbe352fa85b07f28662345432c91c93c856 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -62,6 +62,7 @@ v 7.10.0 (unreleased) - Project labels are now available over the API under the "tag_list" field (Cristian Medina) - Fixed link paths for HTTP and SSH on the admin project view (Jeremy Maziarz) - Fix and improve help rendering (Sullivan Sénéchal) + - Skip email confirmation when set by admin or via LDAP. v 7.9.2 diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 693970e5349f820160e46a3064b680be5994907f..b4c011f213c1bd3507f5940ed2f146301322f104 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -72,8 +72,8 @@ class Admin::UsersController < Admin::ApplicationController end respond_to do |format| + user.skip_reconfirmation! if user.update_attributes(user_params_with_pass) - user.confirm! format.html { redirect_to [:admin, user], notice: 'User was successfully updated.' } format.json { head :ok } else diff --git a/lib/gitlab/ldap/user.rb b/lib/gitlab/ldap/user.rb index cfa8692659d569444ba892600f433351729419f7..806f43c4694c4ec2bf857a1ec1f5dfa8f81f49b6 100644 --- a/lib/gitlab/ldap/user.rb +++ b/lib/gitlab/ldap/user.rb @@ -39,6 +39,7 @@ module Gitlab end def update_user_attributes + gl_user.skip_reconfirmation! gl_user.email = auth_hash.email # Build new identity only if we dont have have same one