Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
PHP AUTH login
Hey guys,
Im brand new to the Vanilla universe. Im having a version of Vanilla2 installed on a .htaccess protected website. What i would like to do is to use the $_SERVER['PHP_AUTH_USER'] to automatically authenticate the users with, when they enter the forum.
How would you suggest to do this?
Im brand new to the Vanilla universe. Im having a version of Vanilla2 installed on a .htaccess protected website. What i would like to do is to use the $_SERVER['PHP_AUTH_USER'] to automatically authenticate the users with, when they enter the forum.
How would you suggest to do this?
0
Answers
1. Create a
Gdn_Dispatcher_BeforeDispatch_Handler($Sender)
function.2. Check make sure a user isn't already signed in: 2. Check
$_SERVER['PHP_AUTH_USER']
3. Look up that user in the user table: 4. If the user doesn't exist then insert the user: 5. Start the session as the user:
I did that, but the Gdn::Session()->Start($UserID, TRUE); returns null and don't do nothing
Thanks for helping
Sorry for code format, I try but I don't find how to format it fine...
Nobody have an idea of why the Gdn::Session()->Start() doesn't works ? I did search in existing plugins about a redirection to do after the Session->Start(), but I didn't find anything working
Gdn::Session()->Start() doesn't return anything, but sets the cookie. Try dumping Gdn::Session()->User after that.
Thanks so much for reply !
Gdn::Session()->Start($UserID, true);
var_dump(Gdn::Session()->User);
returns a bool(false)