At home users Fix
This commit is contained in:
parent
daa0759544
commit
ec4b808d33
@ -3,7 +3,7 @@ class UserManager
|
||||
{
|
||||
public function getUsers () {
|
||||
try {
|
||||
$allUsers = Db::loadAll ("SELECT user_id, username FROM users");
|
||||
$allUsers = Db::loadAll ("SELECT user_id, username, at_home FROM users");
|
||||
return $allUsers;
|
||||
} catch(PDOException $error) {
|
||||
echo $error->getMessage();
|
||||
|
@ -22,10 +22,10 @@ class Home extends Template
|
||||
$usersAtHome = '';
|
||||
$i = 0;
|
||||
foreach ($users as $user) {
|
||||
$i++;
|
||||
if ($user['at_home'] == 'true') {
|
||||
$i++;
|
||||
$usersAtHome .= $user['username'];
|
||||
if ($usersAtHome != "" && isset($users[$i + 1])){
|
||||
if ($usersAtHome != "" && isset($users[$i + 1]) && $users[$i + 1]['at_home'] == 'true'){
|
||||
$usersAtHome .= ', ';
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user