03-09-2017, 08:45 PM
So, I got this working great, but I want to take it one step further to automate it. I've added "adminverify" column to the table, default value of 0, and I want to move my "verifyadmin" call to the header or navigation, wherever you think is best (I'm thinking header).
I want when a user visits a page, before it outputs content to check if the page name (e.g. admin.php) has a adminverify column value of 1, IF it does, call the function, if not, it just does its thing as per usual.
Function:
https://hastebin.com/agexojiwas.php
Call on Page:
I want when a user visits a page, before it outputs content to check if the page name (e.g. admin.php) has a adminverify column value of 1, IF it does, call the function, if not, it just does its thing as per usual.
Function:
https://hastebin.com/agexojiwas.php
Call on Page:
Code:
<?php verifyadmin($user->data()->id) ?>