[sork] Re: [dev] stylesheet problem....

Amith Varghese amith@xalan.com
Fri, 20 Sep 2002 21:15:12 -0400


> This is because there is no $_SESSION. Any reason why this might happen in
> passwd?
> 
> Jan.

Ok, I figured out why this was happening and its of my own doing.  Basically a 
little while back I submitted a patch that allowed you to specify in 
passwd/config/conf.php an optional parameter that contains the dn of the user 
you want to change passwords for so you don't have to bind anonymously and then 
rebind again to the LDAP server.  SO basically in my conf.php I have the 
following

$conf['server']['params']['optional'] = array(
'userdn' => 'uid=' . Auth::getAuth() . ',ou=People,dc=mydomain,dc=com'
);

HOwever, I didn't realize that the conf.php file actually gets loaded in 
css.php and apparently Auth::getAuth() can't access the session in there.  So
I need some other way to obtian the user who is logged in.  Is there any other 
way to do this besides using Auth::getAuth()?  I'm using IMP as my 
authentication.

Thanks
Amith

Also, I noticed a little bug so here is the diff.

--- ldap.php.old        Fri Sep 20 21:05:10 2002
+++ ldap.php    Fri Sep 20 21:06:13 2002
@@ -181,7 +181,7 @@
            if ( isset( $this->params[$realm]['basedn'] ) )
               $basedn =$this->params[$realm]['basedn'];
            if ( isset( $this->params['optional']['userdn'] ) )
-              $binddn = $this->params['optional']['userdn'];
+              $userdn = $this->params['optional']['userdn'];
         }

         if ( $host == "" || $port == "" || $basedn == "") {