diff options
| author | Jarka Kadlecova <jarka@gitlab.com> | 2017-07-17 16:38:43 +0200 |
|---|---|---|
| committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-07-19 11:35:17 +0200 |
| commit | a9d940bffcf7447f8d62012bd1c8f866697a12d6 (patch) | |
| tree | 98a3cb03c47cb7d066c456e5931ccb5a8662dbb2 /app/models/user.rb | |
| parent | 0cd42fea229a4e3ab9e7e11236b7bd08cff45d00 (diff) | |
| download | gitlab-ce-a9d940bffcf7447f8d62012bd1c8f866697a12d6.tar.gz | |
Use Ghost user when edited_by, merged_by deleted34930-fix-edited-by
Diffstat (limited to 'app/models/user.rb')
| -rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 8f40af24e20..c26be6d05a2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -385,9 +385,11 @@ class User < ActiveRecord::Base # Return (create if necessary) the ghost user. The ghost user # owns records previously belonging to deleted users. def ghost - unique_internal(where(ghost: true), 'ghost', 'ghost%s@example.com') do |u| + email = 'ghost%s@example.com' + unique_internal(where(ghost: true), 'ghost', email) do |u| u.bio = 'This is a "Ghost User", created to hold all issues authored by users that have since been deleted. This user cannot be removed.' u.name = 'Ghost User' + u.notification_email = email end end end |
