mirror of
https://github.com/glmdev/eecs448-lab10
synced 2026-03-02 03:39:24 +00:00
Initial commit
This commit is contained in:
23
ViewUsers.php
Normal file
23
ViewUsers.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
require './configuration.php';
|
||||
|
||||
$page = new common\Page;
|
||||
$users = new app\UserRepository;
|
||||
|
||||
$page->title('EECS 448 Lab 10 - Exercise 5')
|
||||
->header('View Registered Users');
|
||||
|
||||
$registered_users = $users->find();
|
||||
|
||||
$table_display = array_merge([
|
||||
// Add the table headers
|
||||
['User ID', 'Username'],
|
||||
], array_map(function($user) {
|
||||
// Map from associative array to keyed
|
||||
return array_values($user);
|
||||
}, $registered_users));
|
||||
|
||||
$page->table($table_display);
|
||||
|
||||
$page->write();
|
||||
Reference in New Issue
Block a user