diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-03-29 12:00:35 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-04-05 12:30:28 +0100 |
commit | 3a02f5e91bca03cbe9cbc29bcea5a1df7499eadb (patch) | |
tree | c025a9091fac8b4c6a8ae42b4ff7ab1aa0fb1542 /perllib/FixMyStreet/DB | |
parent | 8ca5583e62b1c24128b8d691a8b5f5236ce99eef (diff) |
Fix superusers creating anonymous reports.
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/User.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/User.pm b/perllib/FixMyStreet/DB/Result/User.pm index bf74e6934..546867c34 100644 --- a/perllib/FixMyStreet/DB/Result/User.pm +++ b/perllib/FixMyStreet/DB/Result/User.pm @@ -292,6 +292,11 @@ sub body { return $self->from_body->name; } +sub moderating_user_name { + my $self = shift; + return $self->body || _('an administrator'); +} + =head2 belongs_to_body $belongs_to_body = $user->belongs_to_body( $bodies ); |