experimental This backend provides authentication against a PunBB forum installed on the same server. It provides single signon for the forum and the wiki by reusing PunBB's cookies.
The backend reuses your PunBB configuration. You just need to enable it and set is the PUN_ROOT define pointing to the installation dir of your PunBB forum. Just add it to your conf/local.protected.php:
$conf['useacl'] =1; $conf['authtype']='punbb'; define('PUN_ROOT','/path/to/punbb/');
This path must be an absolute path, like /var/www/free.fr/2/8/mysite/punbb/ for example. And must end with a /!
My account is in the admins group of the wiki, and in the administrators group of punbb, but I have no more access to DW admin though I am logged in successfully. I fulfill the requirements, and did the conf. forum is at forum.example.net, and wiki is at www.example.net/forum.
ANy tip welcomed. Mathias 07-11-2006 02:18
⇒ On my installation I only changed the Dokuwiki Superuser group to @Administrators and that worked fbianco
=⇒It is not working for me, are there any other ways?
Change the Dokuwiki Superuser group form @Administrators to @Administrateurs
Simply add this line into .htaccess file: php_value magic_quotes_gpc off
Since PHP5, magic_quotes_gpc is disabled by default and with PHP6, it won't be available at all. If your host lets you choose between PHP4 and PHP5, then go for PHP5.
Dokuwiki use UTF-8 and PunBB ISO8859-1, so this is just a character encoding problem. In order to get the right usernames, open /dokuwiki/inc/auth/punbb.class.php, find (l136 on v. 2007-06-26b) :
if(isset($pun_user) && !$pun_user['is_guest']){ // okay we're logged in - set the globals $USERINFO['pass'] = $pun_user['password']; $USERINFO['name'] = $pun_user['realname']; $USERINFO['mail'] = $pun_user['email']; $USERINFO['grps'] = array($pun_user['g_title']); $_SERVER['REMOTE_USER'] = $pun_user['username']; $_SESSION[DOKU_COOKIE]['auth']['user'] = $pun_user['username']; $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO; return true; }
And replace by :
if(isset($pun_user) && !$pun_user['is_guest']){ // okay we're logged in - set the globals $USERINFO['pass'] = $pun_user['password']; $USERINFO['name'] = utf8_encode($pun_user['realname']); $USERINFO['mail'] = $pun_user['email']; $USERINFO['grps'] = array($pun_user['g_title']); $_SERVER['REMOTE_USER'] = utf8_encode($pun_user['username']); $_SESSION[DOKU_COOKIE]['auth']['user'] = utf8_encode($pun_user['username']); $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO; return true; }
Maximilien Thiel 2007-11-13 - 11:00 UTC +01:00
// okay we're logged in - set the globals $USERINFO['pass'] = $pun_user['password']; $USERINFO['name'] = preg_match('/^1\.2/',$pun_config['o_cur_version']) ? utf8_encode($pun_user['realname']) : $pun_user['realname']; $USERINFO['mail'] = $pun_user['email']; $USERINFO['grps'] = array($pun_user['g_title']);
(only the $USERINFO['name'] line is changed)
Stéphane Gully
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported