Commit 27077ab2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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
parents 30e28a7e 25a566da
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'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment