diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb index f8a7d133d1d..6d7f8eb4b02 100644 --- a/app/mailers/emails/profile.rb +++ b/app/mailers/emails/profile.rb @@ -1,8 +1,7 @@ module Emails module Profile - def new_user_email(user_id, password, token = nil) + def new_user_email(user_id, token = nil) @user = User.find(user_id) - @password = password @target_url = user_url(@user) @token = token mail(to: @user.email, subject: subject("Account was created for you")) diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index c9a1574b84e..2b6217e2e29 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -107,7 +107,7 @@ class NotificationService # Notify new user with email after creation def new_user(user, token = nil) # Don't email omniauth created users - mailer.new_user_email(user.id, user.password, token) unless user.extern_uid? + mailer.new_user_email(user.id, token) unless user.extern_uid? end # Notify users on new note in system diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index e06e8826e5c..a0c37587b23 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -46,7 +46,7 @@ describe Notify do token = 'kETLwRaayvigPq_x3SNM' - subject { Notify.new_user_email(new_user.id, new_user.password, token) } + subject { Notify.new_user_email(new_user.id, token) } it_behaves_like 'an email sent from GitLab' @@ -83,7 +83,7 @@ describe Notify do let(:example_site_path) { root_path } let(:new_user) { create(:user, email: 'newguy@example.com', password: "securePassword") } - subject { Notify.new_user_email(new_user.id, new_user.password) } + subject { Notify.new_user_email(new_user.id) } it_behaves_like 'an email sent from GitLab'