aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 80fd7e0687..454c4fd648 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -915,6 +915,12 @@ class session
if ($banned && !$return)
{
+ // If the session is empty we need to create a valid one...
+ if (empty($this->session_id))
+ {
+ $this->session_create(ANONYMOUS);
+ }
+
// Initiate environment ... since it won't be set at this stage
$this->setup();
@@ -941,6 +947,13 @@ class session
$this->session_kill(false);
}
+ // Ok, we catch the case of an empty session id for the anonymous user...
+ // This can happen if the user is logging in, banned by username and the login_box() being called "again".
+ if (empty($this->session_id))
+ {
+ $this->session_create(ANONYMOUS);
+ }
+
// Determine which message to output
$till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : '';
$message = ($ban_row['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM';