Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Using vanilla authentication for non vanilla pages
Hi,
What I'm trying to do is use the vanilla login to give users access to various areas of my site. I've got so far with this but now I've really hit a brick wall, and I'm not sure what to do next. It works in my root folder, but for some reason as soon as I try to do it from another folder it dies. Specifically, it always thinks your not logged in even when you are. This problem occurs in the root as well if a full address (http://...) is used in the includes. The code I'm using to see if a user is logged in is:
include_once("./forum/appg/settings.php");
include_once("./forum/appg/init_people.php");
if ($Context->Session->UserID > 0)
{
//Person is logged in
}
else
{
//Person is not logged in
}
I'd be very grateful for any advice on what's going on here.
Jimmy
0
This discussion has been closed.
Comments
e.g.
root:
include_once("./forum/appg/settings.php");
include_once("./forum/appg/init_people.php");
root/subfolder
include_once("../forum/appg/settings.php");
include_once("../forum/appg/init_people.php");
root/subfolder/subfolder
include_once("../../forum/appg/settings.php");
include_once("../../forum/appg/init_people.php");
Good luck