Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 774d4caa806..3e85b90c815 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -141,6 +141,8 @@ class User < ActiveRecord::Base
after_initialize :set_projects_limit
after_destroy :post_destroy_hook
+ before_validation :skip_internal_confirmation
+
# User's Layout preference
enum layout: [:fixed, :fluid]
@@ -370,6 +372,10 @@ class User < ActiveRecord::Base
where(Hash[internal_attributes.zip([[false, nil]] * internal_attributes.size)])
end
+ def skip_internal_confirmation
+ skip_confirmation! if internal?
+ end
+
#
# Instance methods
#