User authentication with Simple Machines Forum.
Tested with SMF 1.1.4 and DokuWiki version 2007-06-26b.
This assumes that all user accounts will be created and maintained by SMF. For user groups it selects only the first user group.
For admin account add the memberName from your *_members table in conf/local.php:
$conf['superuser']='%smfadmin_memberName'
Or (I found this easier) simply tell DokuWiki that you want people in the SMF Administrator group to be DokuWiki 'superusers' instead. — Chris Rowson 2008-02-16 00:35
$conf['superuser'] = '@Administrator';
Also change the table prefix in the queries below (here it is smfforum). If you don't have a table prefix omit everything up to and including the underscore.
$conf['auth']['mysql']['checkPass'] = "SELECT passwd FROM smfforum_members WHERE memberName = '%{user}' AND passwd = SHA1(concat(LOWER('%{user}'), '%{pass}'))"; $conf['auth']['mysql']['getUserInfo'] = "SELECT passwd AS pass, realName AS name, emailAddress AS mail FROM smfforum_members WHERE memberName = '%{user}'"; $conf['auth']['mysql']['getGroups'] = "SELECT groupName as `group` FROM smfforum_membergroups g, smfforum_members u WHERE u.memberName = '%{user}' AND u.ID_GROUP = g.ID_GROUP"; $conf['auth']['mysql']['getUsers'] = "SELECT DISTINCT memberName AS user FROM smfforum_members AS u LEFT JOIN smfforum_membergroups AS g ON u.ID_GROUP=g.ID_GROUP"; $conf['auth']['mysql']['FilterLogin'] = "u.memberName LIKE '%{user}'"; $conf['auth']['mysql']['FilterName'] = "u.realName LIKE '%{name}'"; $conf['auth']['mysql']['FilterEmail'] = "u.emailAddress LIKE '%{email}'"; $conf['auth']['mysql']['FilterGroup'] = "g.groupName LIKE '%{group}'"; $conf['auth']['mysql']['SortOrder'] = "ORDER BY u.memberName";
— Mykhaylo Sorochan 2007-12-08 22:35
A community-developed Auth module for SMF and Dokuwiki integration, see this thread for download/discussion.
/**
* SMF authentication backend for Dokuwiki v 2009-07-17
*
* @license Creative Commons BY
* @author David Frank <bitinn@gmail.com>
* @version 0.3
* @base for Dokuwiki 2009-02-14 + SMF 1.1.10
*
* Provide as an alternative to smf.class.php
* Does not introduce new trustExternal() to verify user,
* merely extends a few funtions from mysql.class.php
*
* Pros:
* allow user registration within dokuwiki
* allow full user managerment within dokuwiki
* dokuwiki handles login, avoid old smf_api
* (which causes extensive amount of frustration)
*
* Cons:
* one-click login integration will be difficult
* (currently users have to login wiki/forum seperately)
* user deletion within dokuwiki is not complete
* (see additional comment on delUserRefs)
*/