Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introduction to User Authentication in PHP!
You have completed Introduction to User Authentication in PHP!
Preview
Here we will create an administration panel that displays all the users and allows their role to be changed.
Code Snippet
<div class="panel">
<h4>Users</h4>
<table class="table table-striped">
<thead>
<tr>
<th>Username</th>
<th>Registered</th>
<th>Promote/Demote</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
So we need a way to set administrators.
0:00
We'll want to make sure that
an administrator is able to promote
0:01
other users to an administrator as well.
0:05
We'll need to add this
functionality in two steps.
0:08
First, we need to create a user list
with promote and demote buttons.
0:12
When we have those wired up, we'll
promote ourselves to an administrator.
0:18
After that,
0:22
we'll lock down the administrator
panel to only administrators.
0:23
Let's create a new file,
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up