07-31-2017, 06:36 PM
You could use or from us_helpers.php, and when they don't have permission you can (or whatever your payment pay is called). This will redirect anyone without the STUDENT permission to your payment page.
I use a customer permissions system so there may be a more optimum way for you to do this but give it a shot and see if it works for you.
Code:
checkPermission()
Code:
checkMenu()
Code:
Redirect::to('payments.php')
Code:
//When placed before securePage() this will redirect to your custom page
Code:
if (!checkPermission($studentPermissionId)){Redirect::to('payments.php');}
Code:
// If placed before checkPermission() this will redirect to account.php
Code:
// when logged in or login.php if not, but doesn't send them to
Code:
// your custom payment page
Code:
if (!securePage($_SERVER['PHP_SELF'])){die();}
Code:
echo 'Hello Student, you have permission to view this course.';
I use a customer permissions system so there may be a more optimum way for you to do this but give it a shot and see if it works for you.