For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > June 2005 > Re: [PEAR] PEAR::Auth - trying to add my own storange container









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] PEAR::Auth - trying to add my own storange container
bertrand Gugger

2005-06-07, 4:00 pm

Hi
Lucas Brasilino wrote:

> <?php
> include_once ("Auth/Container.php");
>
> class MyLDAPAuth extends Auth_Container
> {
> public $MyAuth_ldapconn;
> public $MyAuth_binddn;
> public $MyAuth_basedn;
> public $MyAuth_userattr;
>
> function AuthContainerDatabase ($params)


you want perhaps a constructor ?
MyLDAPAuth($params)
or
*__construct* ($params)

> function fetchData ($username, $password)
> {
> $binddn = $MyAuth_serattr."=".$username.",".$MyAuth_basedn;
> /* line 23: */
> $ldapbind = ldap_bind ($MyAuth_ldapconn, $binddn, $password);


and use your connection:
$ldapbind = ldap_bind ($this->MyAuth_ldapconn, $binddn, $password);

à+
--
bertrand Gugger
http://toggg.com/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com