cvs: pear /Auth/Container LDAP.php

From: Date: Mon, 27 Mar 2006 05:23:34 +0000
Subject: cvs: pear /Auth/Container LDAP.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-39359@lists.php.net to get a copy of this message
aashley Mon Mar 27 05:23:34 2006 UTC Modified files: /pear/Auth/Container LDAP.php Log: Remove _disconnect() call from Auth_Container_LDAP::checkGroup() and put it back in getAuthData() where it belongs http://cvs.php.net/viewcvs.cgi/pear/Auth/Container/LDAP.php?r1=1.30&r2=1.31&diff_format=u Index: pear/Auth/Container/LDAP.php diff -u pear/Auth/Container/LDAP.php:1.30 pear/Auth/Container/LDAP.php:1.31 --- pear/Auth/Container/LDAP.php:1.30 Thu Mar 2 06:53:08 2006 +++ pear/Auth/Container/LDAP.php Mon Mar 27 05:23:34 2006 @@ -19,7 +19,7 @@ * @author Hugues Peeters <hugues.peeters@claroline.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: LDAP.php,v 1.30 2006/03/02 06:53:08 aashley Exp $ + * @version CVS: $Id: LDAP.php,v 1.31 2006/03/27 05:23:34 aashley Exp $ * @link http://pear.php.net/package/Auth */ @@ -184,7 +184,7 @@ * @author Hugues Peeters <hugues.peeters@claroline.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version Release: @package_version@ File: $Revision: 1.30 $ + * @version Release: @package_version@ File: $Revision: 1.31 $ * @link http://pear.php.net/package/Auth */ class Auth_Container_LDAP extends Auth_Container @@ -580,7 +580,9 @@ if (strlen($this->options['group'])) { // decide whether memberattr value is a dn or the username $this->_debug('Checking group membership', __LINE__); - return $this->checkGroup(($this->options['memberisdn']) ? $user_dn : $username); + $return = $this->checkGroup(($this->options['memberisdn']) ? $user_dn : $username); + $this->_disconnect(); + return $return; } else { $this->_debug('Authenticated', __LINE__); $this->_disconnect(); @@ -636,13 +638,11 @@ if (@ldap_count_entries($this->conn_id, $result_id) == 1) { @ldap_free_result($result_id); $this->_debug('User is member of group', __LINE__); - $this->_disconnect(); return true; } } // default $this->_debug('User is NOT member of group', __LINE__); - $this->_disconnect(); return false; }

« previous php.pear.cvs (#39359) next »