The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Private Pages (Twig)
#1
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.
  Reply


Messages In This Thread
Private Pages (Twig) - by whatwilldo - 10-28-2017, 05:29 PM
Private Pages (Twig) - by Brandin - 10-28-2017, 05:47 PM
Private Pages (Twig) - by whatwilldo - 10-28-2017, 05:58 PM
Private Pages (Twig) - by Brandin - 10-28-2017, 06:03 PM
Private Pages (Twig) - by whatwilldo - 10-28-2017, 06:23 PM
Private Pages (Twig) - by Brandin - 10-28-2017, 06:28 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)