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.

Syncing site account creation with Vanilla account creation

edited September 2005 in Vanilla 1.0 Help
Hello, I have a website that requires users to sign up for an account to use many of the features. Of course, vanilla requires a password as well. I'd like to integrate the two so that users need only sign up once and have access to all parts of the site. The easiest way to do this is probably inserting a row into the Vanilla user table when a new site account is created. My only concern is password encryption; How can I be sure that the passwords are being encrypted the same way by my site and Vanilla? I want to make sure I write my INSERT command correctly. A problem with this technique is that it will still require separate sign ins for the site and Vanilla because of sessions and cookies and stuff. Maybe the best way to get around this is to get rid of my site's user table and have it use the Vanilla user table for the whole site. But how can I set up the other pages in my site to use the Vanilla session? Are there classes for this purpose? I'm having a hard time interpreting the code... could use some pointing in the right direction. Thanks for your time! Andrew

Comments

  • Hrmmm, someone several weeks ago came by and was asking the same thing. I am not sure however if a solution was figured out or what became of it. But I am fairly certain you will have to rely on either one table or the other, preferably fall back onto the vanilla password/userbase as exporting it to another one will likely not work.
  • MarkMark Vanilla Staff
    If you're having a hard time understanding the code, a good place to start is at the order of execution. It basically outlines what goes on as a page is parsed by your server.

    All sessions in Vanilla are handled through the Session class, which can be found in your library/Vanilla.Session.class.php file.

    All user management is done with the library/Vanilla.User.class.php file. Inside that file there are two classes: User and UserManager. User is an object representation of a user and the Manager handles creating, saving, and retrieving users. For example, to create a user, you would call UserManager.CreateUser();

    You may not want to use the vanilla classes in your application because they all use the context object, which you probably don't need. But you can certainly take a look at those ones and see how vanilla sessions and users are handled. That way you can see how to insert a new user and how to set up a session so that it can be shared with Vanilla.
This discussion has been closed.