auth:mysql_wbb
« MySQL Authentification Backend
Woltlab Burning Board
User authentication with WBB.
User accounts will be created and maintained through WBB, any number of user roles can also be created and used for ACL in DokuWiki.
The user role's “Administratoren” members will automatically become DokuWiki superusers.
the database prefix in this example is wcf1_ which needs to be replaced with your own.
Tested on WBB version 3.1 and DokuWiki version 2009-12-25c “Lemming”. Paste in: conf/local.protected.php
//general settings $conf['useacl'] = 1; // turn on Access Control Lists $conf['authtype'] = 'mysql'; // use MySQL back-end for WBB $conf['superuser'] = '@Administratoren'; // WBB role that will be DokuWiki superuser $conf['defaultgroup'] = 'Registrierte Benutzer'; // default group from the WBB which has access to the wiki $conf['disableactions'] = 'register,resendpwd,profile'; // maintained through WBB //server settings $conf['auth']['mysql']['server'] = 'localhost'; $conf['auth']['mysql']['user'] = 'forum'; $conf['auth']['mysql']['password'] = 'pass'; $conf['auth']['mysql']['database'] = 'forum'; //$conf['auth']['mysql']['charset'] = 'latin1_swedish_ci'; // you may want specify the collation of WBB database $conf['auth']['mysql']['TablesToLock'] = 'array("wcf1_user", "wcf1_user AS u","wcf1_group", "wcf1_group AS g", "wcf1_user_to_groups", "wcf1_user_to_groups AS ug")'; $conf['auth']['mysql']['forwardClearPass'] = '1'; $conf['auth']['mysql']['checkPass'] = 'SELECT password AS pass FROM wcf1_user AS u JOIN wcf1_user_to_groups AS ug ON u.userID=ug.userID JOIN wcf1_group AS g ON g.groupID=ug.groupID WHERE username=\'%{user}\' AND groupName=\'%{dgroup}\' AND password=SHA1(CONCAT(salt,SHA1(CONCAT(salt,SHA1(\'%{pass}\')))))'; $conf['auth']['mysql']['getUserInfo'] = 'SELECT password AS pass, username AS name, email AS mail FROM wcf1_user WHERE username=\'%{user}\''; $conf['auth']['mysql']['getGroups'] = 'SELECT groupName as `group` FROM wcf1_group g, wcf1_user u, wcf1_user_to_groups ug WHERE u.userID = ug.userID AND g.groupID = ug.groupID AND u.username=\'%{user}\''; $conf['auth']['mysql']['getUsers'] = 'SELECT DISTINCT username AS user FROM wcf1_user AS u LEFT JOIN wcf1_user_to_groups AS ug ON u.userID=ug.userID LEFT JOIN wcf1_group AS g ON ug.groupID=g.groupID'; $conf['auth']['mysql']['FilterLogin'] = 'username LIKE \'%{user}\''; $conf['auth']['mysql']['FilterName'] = 'username LIKE \'%{name}\''; $conf['auth']['mysql']['FilterEmail'] = 'email LIKE \'%{email}\''; $conf['auth']['mysql']['FilterGroup'] = 'groupName LIKE \'%{group}\''; $conf['auth']['mysql']['SortOrder'] = 'ORDER BY username';
auth/mysql_wbb.txt · Last modified: 2012-03-18 12:59 by 85.180.78.169