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.

Merge gdn_user with another table

Hi everybody!

With Vanilla 1, you could go into /vanilla/conf/database.php and add a few lines like this

   $DatabaseTables['User'] = 'users';
   $DatabaseColumns['User']['UserID'] = 'user_id';
   $DatabaseColumns['User']['FirstName'] = 'first_name';
   $DatabaseColumns['User']['LastName'] = 'last_name';
   $DatabaseColumns['User']['Password'] = 'password';
   $DatabaseColumns['User']['Email'] = 'email';

which would allow you to combine your user table from your own application (different framework) with the data from Vanilla.

Is this possible in Vanilla 2?

... surely it is ... right?

Cheers,
Tony

Comments

  • I think that with V2 the idea is to make this kind of thing redundant, using instead the Single Sign-On addon. @Mark, @Todd, correct me if I'm wrong?
  • MarkMark Vanilla Staff
    Stash is exactly right. We are still refining single sign-on, but it will most likely be bundled with the final v2 release.
  • @Mark

    Ok, so I've done a hack-job on my existing website to mimick SetIdentity in class.cookieidentity.php (with some hard coded configs for now) in order to log someone into Vanilla2 when they log into my site.

    At the moment, I'm using 1 (the administrator user) for the user id; if I want to synchronise my user accounts from my existing website with Vanilla 2, will I have to just write a few SQL scripts to create them (and their subsequent roles) or is there some fancy trick that I can do?
  • MarkMark Vanilla Staff
    @tonyamazing - We use UserModel->Synchronize() to sync user accounts between systems. @Todd wrote that code, and he's out of town right now. It should be pretty straightforward, though. You can find it at /applications/garden/models/class.usermodel.php
Sign In or Register to comment.