aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php2
-rw-r--r--phpBB/phpbb/session.php7
2 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 28fa7a6be4..f3dfd07ae8 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -278,7 +278,7 @@ class oauth extends \phpbb\auth\provider\base
* token stored in the database.
*/
$ban = $this->user->check_ban($row['user_id'], $row['user_ip'], $row['user_email'], true);
- if ($ban !== false)
+ if (!empty($ban))
{
$till_date = !empty($ban['ban_end']) ? $this->user->format_date($ban['ban_end']) : '';
$message = !empty($ban['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM';
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index 1da00ac1af..31f32af7c4 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -1234,8 +1234,6 @@ class session
$vars = array('return', 'banned', 'ban_row', 'ban_triggered_by');
extract($phpbb_dispatcher->trigger_event('core.session_set_custom_ban', compact($vars)));
- $ban_row['ban_triggered_by'] = $ban_triggered_by;
-
if ($banned && !$return)
{
global $phpbb_root_path, $phpEx;
@@ -1301,6 +1299,11 @@ class session
trigger_error($message);
}
+ if (!empty($ban_row))
+ {
+ $ban_row['ban_triggered_by'] = $ban_triggered_by;
+ }
+
return ($banned && $ban_row) ? $ban_row : $banned;
}