summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Token.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Token.pm')
-rw-r--r--Bugzilla/Token.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/Bugzilla/Token.pm b/Bugzilla/Token.pm
index 3c5261821..6e3095549 100644
--- a/Bugzilla/Token.pm
+++ b/Bugzilla/Token.pm
@@ -237,7 +237,7 @@ sub issue_short_lived_session_token {
# the token to the caller.
$user //= Bugzilla->user;
- return _create_token($user->id, 'session.short', $data);
+ return _create_token($user->id ? $user->id : undef, 'session.short', $data);
}
sub issue_hash_token {