Browse Source

updated Admin/Users controller, en/Admin language & Users/Home view

v3-dev
REJack 6 years ago
parent
commit
ce80f5f956
No known key found for this signature in database
GPG Key ID: 4A44B48700429F46
  1. 5
      app/Controllers/Admin/Users.php
  2. 6
      app/Views/Admin/Users/Home.php

5
app/Controllers/Admin/Users.php

@ -153,9 +153,9 @@ class Users extends Controller
} }
$id = $this->request->getPost('id'); $id = $this->request->getPost('id');
if ($userId == $id) if ($userId === $id)
{ {
if($this->aauth->deleteUser($userId)) if ($this->aauth->deleteUser($userId))
{ {
return redirect()->to('/admin/users'); return redirect()->to('/admin/users');
} }
@ -168,5 +168,4 @@ class Users extends Controller
echo view('Templates/FooterAdmin'); echo view('Templates/FooterAdmin');
} }
} }

6
app/Views/Admin/Users/Home.php

@ -34,12 +34,12 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<? foreach ($users as $user): ?> <?php foreach ($users as $user): ?>
<tr> <tr>
<th scope="row"><?= $user['id'] ?></th> <th scope="row"><?= $user['id'] ?></th>
<td><?= $user['email'] ?></td> <td><?= $user['email'] ?></td>
<td><?= $user['username'] ?></td> <td><?= $user['username'] ?></td>
<td><?= $user['banned'] == 1 ? 'Yes' : 'No' ?></td> <td><?= $user['banned'] === 1 ? 'Yes' : 'No' ?></td>
<td><?= $user['created_at'] ?></td> <td><?= $user['created_at'] ?></td>
<td><?= $user['updated_at'] ?></td> <td><?= $user['updated_at'] ?></td>
<td><?= $user['last_ip_address'] ?></td> <td><?= $user['last_ip_address'] ?></td>
@ -53,7 +53,7 @@
</div> </div>
</td> </td>
</tr> </tr>
<? endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
</div> </div>

Loading…
Cancel
Save