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/services/users/approve_service.rb')
-rw-r--r--app/services/users/approve_service.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/users/approve_service.rb b/app/services/users/approve_service.rb
index 353456c545d..53ec37d0ff7 100644
--- a/app/services/users/approve_service.rb
+++ b/app/services/users/approve_service.rb
@@ -17,6 +17,11 @@ module Users
user.accept_pending_invitations! if user.active_for_authentication?
DeviseMailer.user_admin_approval(user).deliver_later
+ if user.created_by_id
+ reset_token = user.generate_reset_token
+ NotificationService.new.new_user(user, reset_token)
+ end
+
log_event(user)
after_approve_hook(user)
success(message: 'Success', http_status: :created)