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!


  • MarkMark Vanilla Staff
    That's one way of doing it, but you probably also want the users to have a single sign-on (rather than having to sign into both the main application and then again for vanilla). You'd also want some sort of synchronicity between when they update their information in the main application and when they update the same information in vanilla.

    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.
  • Is there any documentation about using the authentication properly in 0.9.3? I'll have to check it out. Full synchronicity would be great, though simply disabling password changes in Vanilla would probably be enough to clear up any major issues.
  • Is this going to be covered in People? I think releasing People as a stand alone plugin authentication app would be quite nifty. Then anyone can simply add it to their site and add as many other Lussumo things knowing that they all connect together.
  • edited February 2006
    I just wrote a site using People authentication, and it was super easy.

    The *only* hard part was getting it to reroute back to my page (not the forum) when signing in and out.
  • MarkMark Vanilla Staff
    Bergamot: if you have suggestions for how to make that easier, please let me know. I want People to be as popular as Vanilla - a nice standalone solution for user authentication. There isn't any documentation of any kind yet for the new code. I'm trying to finish the code before I document it :)
  • edited February 2006
    In People.Control.Leave.php, I added this at the beginning of Leave(&$Context):

    $ReturnUrl = urldecode(ForceIncomingString("ReturnUrl", "")); if ($ReturnUrl == "") header("Location:"); 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(); }


    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.
  • Oh, and be sure to change the first example to your forum, or I'll get a bunch of confused users at my door.
  • edited February 2006
    The other nice thing about this mod is that, if I'm browsing a thread while signed out, and I sign in, it can send me right back to that thread if the ReturnURL is set.

    Actually, I'd be interested in knowing what that variable was originally meant to do, because right now it mostly just sits there.
  • Well, it took me most of the day, but I managed to get this working on 0.9.3. People is pretty slick though I'm sure it'll be easier for rubes like me once there's some documentation.
  • Hi Guys, I'd like to integrate Vanilla's user authentication into my website. What I need is very simple, but not for me.
    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.
Sign In or Register to comment.