Translations of this page?:

Simple Machines Forum

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

See also:

 
auth/mysql_smf.txt · Last modified: 2008/05/28 11:06 by andi
 

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported

Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsTranslate