User authentication with Drupal.
Tested on Drupal version 5.1.
User accounts will be created and maintained through Drupal, any number of user roles can also be created and used for ACL in dokuwiki.
The user role wiki_admin should be created and it's members will automatically become dokuwiki superusers.
the database prefix in this example is drupal_ which needs to be replaced with you own. E.g. drupal_users would become myprefix_users.
//general settings $conf['useacl'] = 1; //turn on Access Control Lists $conf['authtype'] = 'mysql'; //use mysql back-end for drupal $conf['passcrypt'] = 'md5'; //md5 hash is defalut password has for drupal $conf['superuser'] = '@wiki_admin'; //drupal role that will be dokuwiki superuser //server settings $conf['auth']['mysql']['server'] = ''; $conf['auth']['mysql']['user'] = ''; $conf['auth']['mysql']['password'] = ''; $conf['auth']['mysql']['database'] = ''; //used to check user passwords $conf['auth']['mysql']['checkPass'] = "SELECT pass FROM drupal_users WHERE name='%{user}'"; //used to get user information $conf['auth']['mysql']['getUserInfo'] = "SELECT pass, name, mail FROM drupal_users WHERE name='%{user}'"; //this will get a users usergroups. Note all logged in users will be also be automatically part of the //'authenticated user' group. This is useful to add ACL rules such as only logged in users can edit content. //This can easily be done basing rules in the dokuwiki ACL Management on the 'authenticated user' group. $conf['auth']['mysql']['getGroups'] = "SELECT DISTINCT r.name AS 'group' FROM drupal_users AS u, drupal_users_roles AS ur, drupal_role AS r WHERE (u.uid = ur.uid AND r.rid = ur.rid AND u.name = '%{user}') OR r.name = 'authenticated user'";