Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

AuthUserVBulletin

Summary: Allows PmWiki to use vBulletin for a user login/password base, and to borrow PmWiki groups from vBulletin.
Version: 0.1.2
Prerequisites: AuthUserDbase v. 1.0.6, ADOdb database library
Status: beta
Maintainer: XES
Categories: Security

Questions answered by this recipe

How can I have PmWiki read my vBulletin users/passwords and groups for PmWiki authentication? This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.

Description

PmWiki authentication and user groups from vBulletin's database.

This recipe allows PmWiki to read data from the vBulletin database and authenticate users against their vBulletin login data. In addition, it allows you to transfer vBulletin user groups into PmWiki groups.

It does not allow you to manage usernames, passwords or groups for vBulletin from within PmWiki. It only allows PmWiki to borrow information from the vBulletin database. vBulletin would still be needed to change the user information.

Notes

and AuthUserDbase v. 1.0.6

  • you need to know your mysql login information
  • you need to know your vBulletin table prefix. You may need to look at your database to figure it out. The prefix is a set of letters or characters in front of every table that is in use by vBulletin. This is set at the time you install vBulletin.
  • There are 3 optional arrays set in config.php. Each array contains the group id number(#) and the PmWiki group to add the group members to. $VB_UserGID takes #'s from the usergroupid field in vBulletin, $VB_MemberGID takes #'s from the membergroupids field in vBulletin, and $VB_DisplayGID takes information from the displaygroupid field. At least one of these arrays needs to be set for user groups in vBulletin to be transferred to PmWiki. You may leave all three of these fields out or comment them out to disable the group-borrowing features.

Usage

Add to config.php:

// Start AuthUserDBase + VBulletin

include_once("$FarmD/cookbook/adodb/adodb.inc.php");

// database login information - not optional
$VB_DBase = array (
	'dbtype' => 'mysql',
	'host' => 'localhost',
	'db' => 'database',
	'user' => 'username',
	'password' => 'dbpassword');
// if your vBulletin installation uses a table prefix enter it here
$VB_TablePrefix = "prefix_";
// each of the following is optional
$VB_UserGID = array (
	'#' => '@group'
	);
$VB_MemberGID = array (
	'#' => '@group');

$VB_DisplayGID = array (
	'#' => '@group');

// not optional - includes the script
include_once("$FarmD/cookbook/vbulletin.php");

$AUDBaseDBase = $VB_DBase;
$AUDBaseEncryption = 'vbulletin';
$AUDBaseTable = array(
	'table' => 'user',
	'userfield' => 'username',
	'pwfield' => 'password');

require_once("$FarmD/cookbook/AuthUserDbase-1.0.6.php");
require_once("$FarmD/scripts/authuser.php");

// End AuthUserDBase + VBulletin

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

Comments

I've come across this recipe, and I'd like to adapt it to use user groups from my forum, which doesn't run on vBulletin. However, I'm not familiar enough with either vBulletin, or the architecture of pmWiki to work out how to adapt it. Could anybody give me some pointers?

First, this recipe has not been updated to use the latest AuthUserDBase -- not sure if it's compatible. Assuming it is: if the forum application is similar enough to VBulletin, I'd start with changing the tables and fields this one points to. I didn't even have VBulletin to do this -- I had a specific client who supplied me with the table/field info for VBulletin, and I created the recipe. Assuming you have some database and PHP experience, you can probably figure out whether this recipe could be adapted to your forums.
XES January 27, 2007, at 04:25 PM

See Also

Contributors

XES

Edit - History - Print - Recent Changes - Search
Page last modified on January 27, 2007, at 04:25 PM