Hello!
I'd like to authenticate in DokuWiki using the Typo3 users. There is a specific page in the documentation (
https://www.dokuwiki.org/plugin:authmysql:typo3), which details exactly what I want. The problem is that it's not working for me.
My configuration (local.protected.php):
$conf['plugin']['authmysql']['server'] = '...';
$conf['plugin']['authmysql']['user'] = '...';
$conf['plugin']['authmysql']['password'] = '...';
$conf['plugin']['authmysql']['database'] = '...';
$conf['plugin']['authmysql']['TablesToLock'] = array("fe_users", "fe_groups");
$conf['plugin']['authmysql']['checkPass'] = "
SELECT password as pass
FROM fe_users, fe_groups
where fe_users.username='%{user}'
//and fe_groups.title ='%{dgroup}'
and fe_groups.title ='WikiUsers'
and ( fe_users.usergroup REGEXP CONCAT( ',', CONVERT(fe_groups.uid, CHAR), ',')
or fe_users.usergroup REGEXP CONCAT( '^', CONVERT(fe_groups.uid, CHAR), ',')
or fe_users.usergroup REGEXP CONCAT( ',', CONVERT(fe_groups.uid, CHAR), '$')
or fe_users.usergroup REGEXP CONCAT( '^', CONVERT(fe_groups.uid, CHAR), '$')
)
";
$conf['plugin']['authmysql']['getUserInfo'] = "
SELECT password AS pass, name, email AS mail
FROM fe_users
WHERE username = '%{user}'
";
$conf['plugin']['authmysql']['getGroups'] = "
SELECT fe_groups.title as `group`
FROM fe_users, fe_groups
//where fe_users.username='test'
where fe_users.username='%{user}'
and ( fe_users.usergroup REGEXP CONCAT( ',', CONVERT(fe_groups.uid, CHAR), ',')
or fe_users.usergroup REGEXP CONCAT( '^', CONVERT(fe_groups.uid, CHAR), ',')
or fe_users.usergroup REGEXP CONCAT( ',', CONVERT(fe_groups.uid, CHAR), '$')
or fe_users.usergroup REGEXP CONCAT( '^', CONVERT(fe_groups.uid, CHAR), '$')
)";
In the checkPass query, if I leave fe_groups.title ='%{dgroup}' I have an error because in that case the value is "user", which is not a defined group for me. So I put a real group there (WikiUsers, hardcoded).
In the getgroups query, fe_users.username='test' (documentation) was changed to fe_users.username='%{user}'.
I can login but then I have a:
Permission Denied
Sorry, you don't have enough rights to continue.
Do I need to give special permissions to that group?
Does anyone have a working configuration and instructions on what else to do?
Thank you!