1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-25 02:13:15 +02:00

Add check to see if user ID exists before displaying profile

This commit is contained in:
Tijn Kuyper
2016-03-10 11:53:05 +01:00
parent 36f57d805b
commit c8bcce656f

View File

@ -187,7 +187,8 @@ if (vartrue($records) > 30)
if (isset($id)) if (isset($id))
{ {
if ($id == 0) $user_exists = $sql->count("user","(*)", "WHERE user_id = ".$id."");
if($id == 0 || $user_exists == false)
{ {
$text = "<div style='text-align:center'>".LAN_USER_49." ".SITENAME."</div>"; $text = "<div style='text-align:center'>".LAN_USER_49." ".SITENAME."</div>";
$ns->tablerender(LAN_ERROR, $text); $ns->tablerender(LAN_ERROR, $text);