diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php index 41e1734160..370a81454f 100644 --- a/phpBB/includes/mcp/mcp_notes.php +++ b/phpBB/includes/mcp/mcp_notes.php @@ -98,7 +98,7 @@ class mcp_notes $userrow = $db->sql_fetchrow($result); $db->sql_freeresult($result); - if (!$userrow) + if (!$userrow || (int) $userrow['user_id'] === ANONYMOUS) { trigger_error('NO_USER'); } diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index e6c642dff5..749b33163f 100644 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -386,7 +386,7 @@ class mcp_warn $user_row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - if (!$user_row) + if (!$user_row || (int) $user_row['user_id'] === ANONYMOUS) { trigger_error('NO_USER'); }