summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 1ea1e59a3..27ed0876c 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -406,6 +406,11 @@ sub login {
$class->user->update_last_seen_date();
}
+ if ($type == LOGIN_REQUIRED && ! $class->user->id) {
+ FATAL("Detected failure to throw login_required when login was required and user is not logged in.");
+ ThrowUserError('login_required');
+ }
+
return $class->user;
}