DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:authmysql:vbulletin

vBulletin 3.5+

Configuration for authMySQL Auth plugin to authenticate with vBulletin, which let's do:

  • Only basic authentication
  • No user modification/adding. This assumes that all user/group accounts will be created and maintained through vBulletin.

If your vBulletin install is using table prefix such as vb_ then you need to modify the sql queries and prepend the prefix to table names.

Note that all user/group management, registration, and removal sql values are set to empty string “” or commented out. Use vBulletin to manage users/groups/etc.

Configuration

Use the Config Manager or add it to the conf/local.protected.php to store the config protected.

conf/local.protected.php
<?php
/**
 * vBulletin configuration for MySQL Auth Plugin
 * See https://www.dokuwiki.org/plugin:authmysql:vbulletin for details
 */
 
$conf['authtype']    = 'mysql';
 
$conf['plugin']['authmysql']['server']   = 'localhost';
$conf['plugin']['authmysql']['user']     = 'forum';
$conf['plugin']['authmysql']['password'] = 'forumpass';
$conf['plugin']['authmysql']['database'] = 'forum';
 
$conf['plugin']['authmysql']['debug'] = 0;
$conf['plugin']['authmysql']['forwardClearPass'] = 1;
$conf['plugin']['authmysql']['TablesToLock']= array();
$conf['plugin']['authmysql']['checkPass']   = "
    SELECT username AS login
      FROM user
     WHERE LOWER(username)= LOWER('%{user}')
       AND MD5(CONCAT(MD5('%{pass}'),salt)) = password";
 
$conf['plugin']['authmysql']['getUserInfo'] = "
    SELECT username AS name, email AS mail
      FROM user
     WHERE LOWER(username)='%{user}'";
$conf['plugin']['authmysql']['getGroups']   = "
    SELECT g.title AS `group` 
      FROM usergroup g, user u
     WHERE u.username = LOWER('%{user}')
       AND ((g.usergroupid =  u.usergroupid)
        OR FIND_IN_SET(g.usergroupid, u.membergroupids))";
$conf['plugin']['authmysql']['getUsers']    = "";
$conf['plugin']['authmysql']['FilterLogin'] = "";
$conf['plugin']['authmysql']['FilterName']  = "";
$conf['plugin']['authmysql']['FilterEmail'] = "";
$conf['plugin']['authmysql']['FilterGroup'] = "";
$conf['plugin']['authmysql']['SortOrder']   = "";
$conf['plugin']['authmysql']['addUser']     = "";
$conf['plugin']['authmysql']['addGroup']    = "";
$conf['plugin']['authmysql']['addUserGroup']= "";
$conf['plugin']['authmysql']['delGroup']    = "";
$conf['plugin']['authmysql']['getUserID']   = "SELECT userid AS id
                                               FROM user
                                               WHERE LOWER(username) ='%{user}'";
$conf['plugin']['authmysql']['delUser']     = "";
$conf['plugin']['authmysql']['delUserRefs'] = "";
$conf['plugin']['authmysql']['updateUser']  = "";
$conf['plugin']['authmysql']['UpdateLogin'] = "";
$conf['plugin']['authmysql']['UpdatePass']  = "";
$conf['plugin']['authmysql']['UpdateEmail'] = "";
$conf['plugin']['authmysql']['UpdateName']  = "";
$conf['plugin']['authmysql']['UpdateTarget']= "";
$conf['plugin']['authmysql']['delUserGroup']= "";
$conf['plugin']['authmysql']['getGroupID']  = "SELECT usergroupid AS id
                                               FROM usergroup
                                               WHERE title='%{group}'";
plugin/authmysql/vbulletin.txt · Last modified: 2013-03-17 02:47 by Klap-in