summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 69885f57c..05eaba099 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -651,6 +651,12 @@ sub mfa_provider {
return $self->{mfa_provider};
}
+sub name_or_login {
+ my $self = shift;
+
+ return $self->name || $self->login;
+}
+
# Generate a string to identify the user by name + login if the user
# has a name or by login only if she doesn't.
sub identity {