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.
Integration with other user systems
I'm looking to integrate Vanilla with a website I'm working on. I've read a few of the threads here about Wordpress integration but it's not quite what I'm looking for.
Really the only thing I need at this point is to make a new Vanilla user whenever someone creates a user on the main website. Is there a quick and easy way to do this before I start hacking away and ruining everything? Thanks!
0
Comments
The authentication issue is handled pretty well in 0.9.3, but the other issues will require some work. Basically don't touch the vanilla code, just write new code to handle it from your side.
The *only* hard part was getting it to reroute back to my page (not the forum) when signing in and out.
$ReturnUrl = urldecode(ForceIncomingString("ReturnUrl", "")); if ($ReturnUrl == "") header("Location: http://pong.uwstout.edu/forum"); else header("Location: ".$ReturnUrl);
And in People.Control.SignInForm, I wrapped
if ($AutoRedirect && $this->Context->Configuration["FORWARD_VALIDATED_USER_URL"] != "") { header("location: ".$this->Context->Configuration["FORWARD_VALIDATED_USER_URL"]); die(); }
with
if ($this->ReturnUrl != "") { header("location: ".$this->ReturnUrl); } else { if ($AutoRedirect && $this->Context->Configuration["FORWARD_VALIDATED_USER_URL"] != "") { header("location: ".$this->Context->Configuration["FORWARD_VALIDATED_USER_URL"]); die(); } }
I *think* those were the main two modifications that needed to be made. ReturnUrl is sent to the form as a GET param, which is stored as a hidden field and passed to the postback as a POST param, which is used to set the header redirect.
In my case, I copied the signin form into the panel, so that saved one step on the chain.
There may be another piece missing from that path; I tried so much stuff before it finally worked that I'm not sure anymore.
Actually, I'd be interested in knowing what that variable was originally meant to do, because right now it mostly just sits there.
I don't have to do things such as merging tables like for integration with Wordpress or Drupal.
My website is in the /root/ folder, Vanilla is installed in /root/vanilla.
How can I check if the user is signed in from the root folder, so from one level upper?
How can I make things like the code below work in /root/index.php?
if ($Context->Session->UserID > 0) { ...}
So I'd like to make a kind of single sign-on for my entire website, so that the user can log in/out on every page.