summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-13 15:30:54 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-13 15:30:54 +0100
commit4a62a0f01a0058d1d260ddecb0341f48b5b2e26d (patch)
tree732a89b25d738a0c41ab2469db05079502efe374 /app
parent529188e4788991961796b1b6131389072ee61efb (diff)
downloadgitlab-ce-4a62a0f01a0058d1d260ddecb0341f48b5b2e26d.tar.gz
Only send "Account was created for you" email when created by admin.
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index d7f688ec138..278f5c662df 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -556,7 +556,7 @@ class User < ActiveRecord::Base
def post_create_hook
log_info("User \"#{self.name}\" (#{self.email}) was created")
- notification_service.new_user(self, @reset_token)
+ notification_service.new_user(self, @reset_token) if self.created_by_id
system_hook_service.execute_hooks_for(self, :create)
end