cvs: pear /Perm_LiveUser/Admin/Auth/Container DB.php MDB.php

From: Date: Thu, 04 Dec 2003 20:44:38 +0000
Subject: cvs: pear /Perm_LiveUser/Admin/Auth/Container DB.php MDB.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-14619@lists.php.net to get a copy of this message
arnaud Thu Dec 4 15:44:38 2003 EDT Modified files: /pear/Perm_LiveUser/Admin/Auth/Container DB.php MDB.php Log: * bring MDB container level with DB container * some useless code was removed Index: pear/Perm_LiveUser/Admin/Auth/Container/DB.php diff -u pear/Perm_LiveUser/Admin/Auth/Container/DB.php:1.25 pear/Perm_LiveUser/Admin/Auth/Container/DB.php:1.26 --- pear/Perm_LiveUser/Admin/Auth/Container/DB.php:1.25 Tue Dec 2 11:10:51 2003 +++ pear/Perm_LiveUser/Admin/Auth/Container/DB.php Thu Dec 4 15:44:37 2003 @@ -48,7 +48,7 @@ * This class is only experimental. API may change. Use it at your own risk. * * @author Bj?rn Kraus <krausbn@php.net> - * @version $Id: DB.php,v 1.25 2003/12/02 16:10:51 arnaud Exp $ + * @version $Id: DB.php,v 1.26 2003/12/04 20:44:37 arnaud Exp $ * @package LiveUser * @category authentication */ @@ -98,18 +98,6 @@ 'is_active' => 'is_active'); /** - * Indicates if backend module initialized correctly. If yes, - * TRUE, if not false. Backend module won't initialize if the - * init value (usually an object or resource handle that - * identifies the backend to be used) is not of the required - * type. - * - * @var boolean - * @access public - */ - var $init_ok = false; - - /** * Constructor * * The second parameters expects an array containing the parameters @@ -167,8 +155,7 @@ * </code> * * @access protected - * @param mixed Array or PEAR::DB object. - * @param array configuration array + * @param array full liveuser conf array * @return void */ function &LiveUser_Admin_Auth_Container_DB(&$connectOptions) @@ -193,7 +180,7 @@ } } } - } // end func LiveUser_Admin_Auth_DB + } /** * Adds a new user to Auth/DB. @@ -338,7 +325,7 @@ } return true; - } // end func changeUser + } /** * Gets all users with handle, passwd, auth_user_id @@ -364,7 +351,7 @@ if (!$this->init_ok) { return false; } - + $fields = ''; if (sizeof($customFields) > 0) { $fields = ','; @@ -378,7 +365,7 @@ {$this->authTableCols['handle']} AS handle, {$this->authTableCols['passwd']} AS passwd, {$this->authTableCols['lastlogin']} AS lastlogin, - CASE {$this->authTableCols['is_active']} + CASE {$this->authTableCols['is_active']} WHEN 'Y' THEN 1 WHEN 'N' THEN 0 END AS is_active Index: pear/Perm_LiveUser/Admin/Auth/Container/MDB.php diff -u pear/Perm_LiveUser/Admin/Auth/Container/MDB.php:1.25 pear/Perm_LiveUser/Admin/Auth/Container/MDB.php:1.26 --- pear/Perm_LiveUser/Admin/Auth/Container/MDB.php:1.25 Thu Dec 4 12:06:02 2003 +++ pear/Perm_LiveUser/Admin/Auth/Container/MDB.php Thu Dec 4 15:44:37 2003 @@ -47,7 +47,7 @@ * This class is only experimental. API may change. Use it at your own risk. * * @author Bj?rn Kraus <krausbn@php.net> - * @version $Id: MDB.php,v 1.25 2003/12/04 17:06:02 arnaud Exp $ + * @version $Id: MDB.php,v 1.26 2003/12/04 20:44:37 arnaud Exp $ * @package LiveUser */ class LiveUser_Admin_Auth_Container_MDB extends LiveUser_Admin_Auth_Common @@ -96,18 +96,6 @@ 'is_active' => 'is_active'); /** - * Indicates if backend module initialized correctly. If yes, - * TRUE, if not false. Backend module won't initialize if the - * init value (usually an object or resource handle that - * identifies the backend to be used) is not of the required - * type. - * - * @access public - * @var boolean - */ - var $init_ok = false; - - /** * Constructor * * The second parameters expects an array containing the parameters @@ -158,7 +146,7 @@ * ) * ); * - * $obj = new LiveUser_Admin_Auth_Container_DB($dsn, $conf); + * $obj = new LiveUser_Admin_Auth_Container_DB($dsn); * </code> * * @access protected @@ -166,12 +154,9 @@ * @param array configuration array * @return void */ - function &LiveUser_Admin_Auth_Container_MDB(&$connectOptions, $conf) + function &LiveUser_Admin_Auth_Container_MDB(&$connectOptions) { - if (is_object($connectOptions)) { - $this->dbc = &$connectOptions; - $this->init_ok = true; - } elseif (is_array($connectOptions)) { + if (is_array($connectOptions)) { $function = 'connect'; if (isset($connectOptions['function'])) { $function = $connectOptions['function']; @@ -187,12 +172,6 @@ $this->init_ok = true; } } - - $this->authTableCols = array_merge($conf['authTableCols'], $this->authTableCols); - $this->authTable = $conf['authTable']; - - //to allow the use of unencrypted passwords - $this->passwordEncryptionMode = $conf['passwordEncryptionMode']; } // end func LiveUser_Admin_Auth_MDB /** @@ -325,7 +304,7 @@ } return true; - } // end func changeUser + } /** * Gets all users with handle, passwd, auth_user_id, @@ -374,4 +353,4 @@ return $userData = array_change_key_case($userData); } // end func getAllUsers } -?> +?> \ No newline at end of file

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