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.
Options

Use/mirror/transfer existing users table

edited August 2006 in Vanilla 1.0 Help
Hi, I'd love to use Vanilla to replace an existing forum when I relaunch a site, problem is I haven't been able to track down any information on how to integrate a Vanilla install with an already existing users table in my db. I see that I have a couple of options: 1. Have 2 users tables, 2 logins and 2 reg screens 2. Persuade Vanilla to use my users table instead 3. Have 2 users tables, the Vanilla one being a mirror of my main one, with 2 login screens but the reg screen on my main site, not vanila I don't like option 1, option 2 is very unlikely, which leaves 3 as the most feasible. I think it should be relatively easy to sort it, I just need to know the correct SQL create a new user in the VanillaUsers table, which I can then call automatically when I create a new user on my main site. Knowing that would also help me no end in transfering all my existing users over automatically as we have a few thousand registered users, and doing that manually would be a nightmare! Hope someone can help, Cheers, Jon

Comments

  • Options
    Option 2 is probably the most likely, or you could persuade your site to use vanilla's table/authentication. I'd suggest you take a look at the People module in the /framework/ folder which deals with *all* of vanilla's user authentication. You can reasonably easily (assuming you're fairly competant) rewrite some of the classes in there to use an external table.
  • Options
    Hi Minisweeper, I'm not sure that re-writing all of Vanilla's user classes is a viable option, it would a) take a long time and b) make upgrading Vanilla much more complicated. Also, it would require some hefty tweaks to my existing table to get it sorted. Ideally, I'd like to see the raw SQL query that Vanilla uses to create a new user, then I can just make a copy at the time of registration. I kow this means duplication of data in the db, but it also keeps unnecessery data from each table and makes upgrades to either system much less painless. Anyone know how I can get this as a string to debug and add to my existing users class? Thanks! jon
  • Options
    The whole point of doing that is to make upgrades less complicated. That's why Mark invented the set of People classes. What's more you probably only need to rewrite one or two. If you wanted to do it your way, you dont even need to find the sql that vanilla uses. There are people classes for creating, removing, and authenticating users. Just give them the correct data input and it'll work fine. Take a look at the CreateUser function here: http://lussumo.com/svn/people/trunk/People.Class.UserManager.php
  • Options
    You can easely make vanilla work on other user table. Check appg/data.php.
  • Options
    This post should help you: http://lussumo.com/community/discussion/3240/#Item_2
  • Options
    Aha! ok, doesn't sound quite so tricky then, does mean some messing with my users table, but not too much, will have a bash, expect some questions! thanks, jon
This discussion has been closed.