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.
authentication issue
I got a script in my root-folder that should check whether a user is logged in or not as I want to display some content for members only. I found this snippnet in the forum:
include("./vanilla/appg/settings.php");
include("./vanilla/appg/init_people.php");
if ($Context->Session->UserID) {
echo "You are logged in as <b>{$Context->Session->User->Name}</b>.";
} else {
echo "You are not logged in.";
}
But unfortunately it's not working. I am logged into vanilla but echo $Context->Session->UserID is 0 and not 1.
Any ideas?
0
This discussion has been closed.
Comments
Will check out my working "snippet" when I get home.