Remove unused password argument from notification
We were still passing a 'password' argument around, but it is not used anywhere because we send a password reset link in the welcome email nowadays.
This commit is contained in:
parent
30e28a7e0c
commit
25a566da0a
3 changed files with 4 additions and 5 deletions
|
@ -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"))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
Loading…
Reference in a new issue