[dokuwiki] Problems with subscriptions and ldap auth
- From: "Neulinger, Nathan" <nneul@xxxxxxx>
- To: <dokuwiki@xxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 08:39:54 -0600
If you use ldap auth, and the ldap server requires authentication,
subscriptions do not currently work because the getUserData routine
doesn't authenticate.
I was able to do a quick fix for us by adding this patch, but you may
want to do something cleaner.
diff -rN -u old-dokuwiki/inc/auth/ldap.class.php
new-dokuwiki/inc/auth/ldap.class.php
--- old-dokuwiki/inc/auth/ldap.class.php 2006-01-31
08:36:53.559814873 -0600
+++ new-dokuwiki/inc/auth/ldap.class.php 2006-01-31
08:36:54.439183478 -0600
@@ -128,6 +128,15 @@
global $conf;
if(!$this->_openLDAP()) return false;
+ if($this->cnf['binddn'] && $this->cnf['bindpw']){
+ // use superuser credentials
+
if(!@ldap_bind($this->con,$this->cnf['binddn'],$this->cnf['bindpw'])){
+ if($this->cnf['debug'])
+ msg('LDAP bind as superuser:
'.htmlspecialchars(ldap_error($this->con)),0);
+ return false;
+ }
+ }
+
$info['user'] = $user;
$info['server'] = $this->cnf['server'];
------------------------------------------------------------
Nathan Neulinger EMail: nneul@xxxxxxx
University of Missouri - Rolla Phone: (573) 341-6679
UMR Information Technology Fax: (573) 341-4216
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: Problems with subscriptions and ldap auth
- From: Andreas Gohr
Other related posts:
- » [dokuwiki] Problems with subscriptions and ldap auth
- » [dokuwiki] Re: Problems with subscriptions and ldap auth
- [dokuwiki] Re: Problems with subscriptions and ldap auth
- From: Andreas Gohr