mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-20 01:56:06 +10:00
Merge branch 'remove_password_argument' into 'master'
Remove unused password argument We no longer put a (random) password in the 'new user' email, so no need to pass it around in the code. See merge request !1279
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user