10-28-2017, 05:29 PM
I'm sorry if this has been asked before, but I've been poking around the web for the last two days and can't seem to find quite what I'm looking for. (Also, I'm new here, so I think I'm allotted some leeway?)
I'm use Slim 3/Twig, but I don't think either of those is the problem (could be wrong). I'm able to load up every page just fine, having set UserSpice aside to load without Twig rendering (basically, got my templates in one directory and UserSpice user pages in another). I can get all of the appropriate pages to show up in the Admin panel (having edited the z_us_root.php array), and I can add or remove permissions/private viewing just fine to any of the pages.
The problem is that I can't seem to figure out exactly how to require the init.php file or the securePage function in my controller so that it will properly check for login status/status and redirect as appropriate.
For example, when a user tries to access example.com/privatepage without being logged in.
I do apologize if this is a silly question. I feel like the answer is so simple and I'm overthinking it.
Thank you in advance.
I'm use Slim 3/Twig, but I don't think either of those is the problem (could be wrong). I'm able to load up every page just fine, having set UserSpice aside to load without Twig rendering (basically, got my templates in one directory and UserSpice user pages in another). I can get all of the appropriate pages to show up in the Admin panel (having edited the z_us_root.php array), and I can add or remove permissions/private viewing just fine to any of the pages.
The problem is that I can't seem to figure out exactly how to require the init.php file or the securePage function in my controller so that it will properly check for login status/status and redirect as appropriate.
For example, when a user tries to access example.com/privatepage without being logged in.
I do apologize if this is a silly question. I feel like the answer is so simple and I'm overthinking it.
Thank you in advance.