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.
Question about Mark's wordpress article
I'm stealing some ideas from Mark's wordpress integration (but using it for my site, not wordpress).
I don't need Vanilla to sign people in, and I see he recommends just deleting the people.php file. However my question is how do I get vanilla to use my auth system (as in, if session does not exist, redirect to my login page) and also, what session do I need to set when using my login so that vanilla sees the session as set and the user logged in.
I guess my question is: what does vanilla check for to see if a user is logged in.. and what would I need to set?
sorry if this is confusing.. but any help would be greatly appreciated
0
This discussion has been closed.
Comments
$Configuration['SAFE_REDIRECT'] = '/path/to/your/auth/module.php';
You can also set the "sign in" and "sign out" links on the top right of the page with the following config params:
$this->Context->Configuration['SIGNIN_URL'] = '/path/to/your/auth/module.php'; $this->Context->Configuration['SIGNOUT_URL'] = '/path/to/your/de-auth/module.php';
The rest of your questions are really covered in the document. You can create your own authentication module that uses whatever methods necessary to get the user's UserID and pass it out of the authentication module. It doesn't matter what you put into the sessions in your app - as long as vanilla can use that info to get the user's UserID and return it.
I've changed conf/settings to point to my Authentication Module, and login/out:
$Configuration['AUTHENTICATION_MODULE'] = 'myAuth.php'; $Configuration['SAFE_REDIRECT'] = 'myAuth.php'; $Configuration['SIGNIN_URL'] = 'mylogin.php'; $Configuration['SIGNOUT_URL'] = 'myLogout.php';
And I mapped to my database and fields in conf/database.php and added the remaining Vanilla user fields to myUserTable:
$DatabaseTables['User'] = 'myUserTable'; $DatabaseColumns['User']['UserID'] = 'myUserId'; $DatabaseColumns['User']['Name'] = 'myUserName'; $DatabaseColumns['User']['Password'] = 'myUserPassword';
When passing from a logged in session from my site into Vanilla, the session is kept and the details are available to the page. But where in Vanilla do I map these details to? Vanilla simply brings up the forum not signed in.
I can't get my head around using my session login and where Vanilla goes looking for an existing session? I've looked at the Authenticator class but to see if I can write something based on that but its cookies etc. I feel like I just need to inject the available details into one place and It'll all work but I'm a little out of my league to know where to start injecting, so to speak.