====== Yet Another Unclassified News Board ====== Configuration for [[plugin:authMySQL]] Auth plugin to connect to [[http://newsboard.unclassified.de/|UNB]], which let's do: * Only basic authentication * Only wanted members of certain groups are able to log into wiki * No user modification/adding. You can maintain your users via UNB, via the DokuWiki interface is not implemented here. Differences with similar MySQL auth config [[unb]]: capitalization of table names and additional statement for group membership checking. So I tried the other UNB example and I could never get it to work. I'm using the most recent version of DokuWiki (2008-05-05), MySQL 5.0.51, and UNB 1.6.4.full. I did have an extra requirement though of I only wanted members of certain groups to be able to log into the wiki in order to make edits. ===Configuration=== Use the Config Manager or add it to ''conf/local.protected.php'' to store the config protected. 0"; // Returns table with info for one user: $conf['plugin']['authmysql']['getUserInfo'] = "SELECT Password AS pass, Name AS name, EMail AS mail FROM unb1_Users WHERE Name='%{user}'"; // Get all groups user is a member of: $conf['plugin']['authmysql']['getGroups'] = "SELECT gn.Name as `group` FROM unb1_GroupMembers gm, unb1_Users u, unb1_GroupNames gn WHERE u.ID = gm.User AND gn.ID = gm.Group AND u.Name='%{user}'"; // This statement should return a table containing all user login names $conf['plugin']['authmysql']['getUsers'] = "SELECT DISTINCT u.Name AS 'user' FROM unb1_Users AS u LEFT JOIN unb1_GroupMembers AS gm ON u.ID=gm.User LEFT JOIN unb1_GroupNames AS gn ON gm.Group=gn.ID"; $conf['plugin']['authmysql']['FilterLogin'] = "u.Name LIKE '%{user}'"; $conf['plugin']['authmysql']['FilterName'] = "u.Name LIKE '%{name}'"; $conf['plugin']['authmysql']['FilterEmail'] = "u.Email LIKE '%{email}'"; $conf['plugin']['authmysql']['FilterGroup'] = "gn.Name LIKE '%{group}'"; $conf['plugin']['authmysql']['SortOrder'] = "ORDER BY u.Name"; // This statement should return the database index of a given user name. $conf['plugin']['authmysql']['getUserID'] = "SELECT ID AS id FROM unb1_Users WHERE Name='%{user}'";