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

Edwin Culp eculp@encontacto.net
Fri, 20 Sep 2002 18:55:49 -0700


Quoting Amith Varghese <amith@xalan.com>:

 | > 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'
 | );
Amith,

There must be a full moon :-)  On my server that has the latest head version
and has Category.php problems.  Changes password fine without anonymous bind.
My configuration is probably exactly like yours;

$usermail=Auth::getAuth();
$password=Auth::getCredential('password');

 $conf['server']['params']['default'] = array(
      'host' => "localhost",
      'port' => 389,
      'userdn' => 'mail=' . $usermail . ',ou=people,o=worldinternet.org',
      'basedn' => 'ou=people,o=worldinternet.org',
      'ldappassword' => $password,
      'uid' => "mail",
      'encryption' => 'crypt');

$conf['server']['params']['optional'] = array(
     'userdn' => 'mail=' . Auth::getAUth() . ',ou=people,o=worldinternet.org'
);

I know that I have an inconsistancy with my $usermail variable but it will
work either way:-)

I have seen no problems with css and password except for a lack there of in
passwd/main.php :-) 

I hope this is useful.

ed
 | 
 | 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 == "") {
 | -- 
 | Sork mailing list
 | Frequently Asked Questions: http://horde.org/faq/
 | To unsubscribe, mail: sork-unsubscribe@lists.horde.org


--