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
To make the authorization checks easier throughout our system, we should create a few helper functions called Guards. These will block requests that are not authorized.
This video doesn't have any notes.
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
For the authorization system of our
application we're going to rely heavily on
0:00
these helper functions.
0:04
When dealing with authorization helper
functions they're sometimes referred to as
0:05
guards.
0:10
A guard is a tool that allows us
to protect certain sections of
0:11
our application.
0:16
We're going to be creating
guards to check the request and
0:18
only allow administrators to view a page.
0:21
This guard will make sure
that a user is logged in and
0:24
that a logged in user is an administrator.
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