diff --git a/web/models/User.model.php b/web/models/User.model.php index 0de2cc2..792436b 100644 --- a/web/models/User.model.php +++ b/web/models/User.model.php @@ -54,9 +54,13 @@ class User extends Model { $u = new User(); $u->load($id); if($filtered===true) - $users[$id] = $u->getDataFiltered(); + $thisdata = $u->getDataFiltered(); else - $users[$id] = $u->data; + $thisdata = $u->data; + + $thisdata['id'] = $id; + + $users[] = $thisdata; } return $users; } diff --git a/web/pages/err/controller.php b/web/pages/err/controller.php index c8a4e60..c128acc 100644 --- a/web/pages/err/controller.php +++ b/web/pages/err/controller.php @@ -16,11 +16,11 @@ class Err extends Page { { $u = new User(); $allusers = $u->getAll(false); - foreach($allusers as $userid => $user) + foreach($allusers as $user) { if($user['token'] && $user['token'] == $_COOKIE['token']) { - $u->id = $userid; + $u->id = $user['id']; break; } }