Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //We are asking the database for a list of all the users and give ALL the results
- $users = $db->findAll("users")->results();
- ?>
- <table class="table table-striped">
- <thead>
- <tr>
- <th>Username</th><th>Joined On</th><th>Group(s)</th>
- </tr>
- </thead>
- <tbody>
- <?php
- //loop through all the users and make one row for each user
- foreach($users as $u){ ?>
- <tr>
- <td><?=$u->username;?></td>
- <td><?=$u->join_date?></td>
- <td>
- <?php
- //Look through the permissions for this user
- $perms = $db->get("user_permission_matches",["user_id","=",$u->id])->results();
- foreach($perms as $p)
- echo $db->cell("permissions.name",$p->permission_id) . ",";
- ?>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement