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

From: Date: Mon, 07 Jun 2004 20:01:45 +0000
Subject: cvs: pear /Perm_LiveUser/Auth/Container DB.php MDB.php MDB2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-20335@lists.php.net to get a copy of this message
arnaud Mon Jun 7 16:01:45 2004 EDT Modified files: /pear/Perm_LiveUser/Auth/Container DB.php MDB.php MDB2.php Log: inline doc

http://cvs.php.net/diff.php/pear/Perm_LiveUser/Auth/Container/DB.php?r1=1.51&r2=1.52&ty=u Index: pear/Perm_LiveUser/Auth/Container/DB.php diff -u pear/Perm_LiveUser/Auth/Container/DB.php:1.51 pear/Perm_LiveUser/Auth/Container/DB.php:1.52 --- pear/Perm_LiveUser/Auth/Container/DB.php:1.51 Mon Jun 7 15:51:15 2004 +++ pear/Perm_LiveUser/Auth/Container/DB.php Mon Jun 7 16:01:44 2004 @@ -30,9 +30,6 @@ require_once 'DB.php'; /** - * Class LiveUser_Auth_Container_DB - * - * Description: * This is a PEAR::DB backend driver for the LiveUser class. * A PEAR::DB connection object can be passed to the constructor to reuse an * existing connection. Alternatively, a DSN can be passed to open a new one. @@ -47,7 +44,7 @@ * 'allowDuplicateHandles' => 1); * * @author Markus Wolff <wolff@21st.de> - * @version $Id: DB.php,v 1.51 2004/06/07 19:51:15 arnaud Exp $ + * @version $Id: DB.php,v 1.52 2004/06/07 20:01:44 arnaud Exp $ * @package LiveUser * @category authentication */ @@ -55,45 +52,49 @@ { /** * dsn to connect to - * @var object + * * @access private + * @var string */ var $dsn = null; /** * disconnect - * @var object + * * @access private + * @var boolean */ - var $disconnect = null; + var $disconnect = false; /** * PEAR::DB connection object - * @var object + * * @access private + * @var object */ var $dbc = null; /** * Auth table * Table where the auth data is stored. - * @var string + * * @access public + * @var string */ var $authTable = 'liveuser_users'; /** * Columns of the auth table. * Associative array with the names of the auth table columns. - * The 'user_id', 'handle' and 'passwd' fields have to be set. + * The 'auth_user_id', 'handle' and 'passwd' fields have to be set. * 'lastlogin' and 'is_active' are optional. * It doesn't make sense to set only one of the time columns without the * other. * * The type attribute is only useful when using MDB or MDB2. * - * @var array * @access public + * @var array */ var $authTableCols = array( 'required' => array( @@ -108,11 +109,11 @@ ); /** - * LiveUser_Auth_Container_DB::LiveUser_Auth_Container_DB() - * * Class constructor. * - * @param mixed + * @access protected + * @param array configuration array + * @return void */ function LiveUser_Auth_Container_DB(&$connectOptions) { @@ -143,6 +144,7 @@ * properly disconnect from resources * * @access public + * @return void */ function disconnect() { @@ -153,8 +155,6 @@ } /** - * LiveUser_Auth_Container_DB::_updateUserData() - * * Writes current values for user back to the database. * This method does nothing in the base class and is supposed to * be overridden in subclasses according to the supported backend. @@ -181,8 +181,6 @@ } /** - * LiveUser_Auth_Container_DB::_readUserData() - * * Reads auth_user_id, passwd, is_active flag * lastlogin timestamp from the database * If only $handle is given, it will read the data http://cvs.php.net/diff.php/pear/Perm_LiveUser/Auth/Container/MDB.php?r1=1.32&r2=1.33&ty=u Index: pear/Perm_LiveUser/Auth/Container/MDB.php diff -u pear/Perm_LiveUser/Auth/Container/MDB.php:1.32 pear/Perm_LiveUser/Auth/Container/MDB.php:1.33 --- pear/Perm_LiveUser/Auth/Container/MDB.php:1.32 Mon Jun 7 15:51:15 2004 +++ pear/Perm_LiveUser/Auth/Container/MDB.php Mon Jun 7 16:01:44 2004 @@ -48,79 +48,78 @@ * 'allowDuplicateHandles' => 1); * * @author Markus Wolff <wolff@21st.de> - * @version $Id: MDB.php,v 1.32 2004/06/07 19:51:15 arnaud Exp $ + * @version $Id: MDB.php,v 1.33 2004/06/07 20:01:44 arnaud Exp $ * @package LiveUser * @category authentication */ class LiveUser_Auth_Container_MDB extends LiveUser_Auth_Common { /** - * dsn that was connected to - * @var object + * dsn to connect to + * * @access private + * @var string */ var $dsn = null; /** * disconnect - * @var object - * @access private - */ - var $disconnect = null; - - /** - * dsn that was connected to - * @var object + * * @access private + * @var boolean */ - var $dsn = null; + var $disconnect = false; /** * PEAR::MDB connection object - * @var object + * * @access private + * @var object */ var $dbc = null; /** * Auth table * Table where the auth data is stored. - * @var string + * * @access public + * @var string */ var $authTable = 'liveuser_users'; /** * Columns of the auth table. * Associative array with the names of the auth table columns. - * The 'user_id', 'handle' and 'passwd' fields have to be set. + * The 'auth_user_id', 'handle' and 'passwd' fields have to be set. * 'lastlogin' and 'is_active' are optional. * It doesn't make sense to set only one of the time columns without the * other. * - * @var array + * The type attribute is only useful when using MDB or MDB2. + * * @access public + * @var array */ var $authTableCols = array( 'required' => array( - 'auth_user_id' => array('name' => 'auth_user_id', 'type' => 'text'), - 'handle' => array('name' => 'handle', 'type' => 'text'), - 'passwd' => array('name' => 'passwd', 'type' => 'text'), + 'auth_user_id' => array('name' => 'auth_user_id', 'type' => ''), + 'handle' => array('name' => 'handle', 'type' => ''), + 'passwd' => array('name' => 'passwd', 'type' => ''), ), 'optional' => array( - 'lastlogin' => array('name' => 'lastlogin', 'type' => 'timestamp'), - 'is_active' => array('name' => 'is_active', 'type' => 'boolean') + 'lastlogin' => array('name' => 'lastlogin', 'type' => ''), + 'is_active' => array('name' => 'is_active', 'type' => '') ) ); /** - * LiveUser_Auth_Container_MDB::LiveUser_Auth_Container_MDB() - * * Class constructor. * - * @param mixed + * @access protected + * @param array configuration array + * @return void */ - function &LiveUser_Auth_Container_MDB(&$connectOptions) + function LiveUser_Auth_Container_MDB(&$connectOptions) { $this->LiveUser_Auth_Common($connectOptions); if (is_array($connectOptions)) { @@ -167,8 +166,6 @@ } /** - * LiveUser_Auth_Container_MDB::_updateUserData() - * * Writes current values for user back to the database. * This method does nothing in the base class and is supposed to * be overridden in subclasses according to the supported backend. @@ -196,8 +193,6 @@ } /** - * LiveUser_Auth_Container_MDB::_readUserData() - * * Reads auth_user_id, passwd, is_active flag * lastlogin timestamp from the database * If only $handle is given, it will read the data @@ -215,7 +210,7 @@ * @param boolean user password * @return boolean true upon success, false otherwise */ - function _readUserData($handle, $passwd=false) + function _readUserData($handle, $passwd = false) { if (!$this->init_ok) { return false; @@ -266,8 +261,6 @@ } /** - * LiveUser_Auth_Container_MDB::userExists() - * * Helper function that checks if there is a user in * the database who's matching the given parameters. * If $checkHandle is given and $checkPW is set to http://cvs.php.net/diff.php/pear/Perm_LiveUser/Auth/Container/MDB2.php?r1=1.11&r2=1.12&ty=u Index: pear/Perm_LiveUser/Auth/Container/MDB2.php diff -u pear/Perm_LiveUser/Auth/Container/MDB2.php:1.11 pear/Perm_LiveUser/Auth/Container/MDB2.php:1.12 --- pear/Perm_LiveUser/Auth/Container/MDB2.php:1.11 Mon Jun 7 15:51:15 2004 +++ pear/Perm_LiveUser/Auth/Container/MDB2.php Mon Jun 7 16:01:44 2004 @@ -48,70 +48,76 @@ * 'allowDuplicateHandles' => 1); * * @author Markus Wolff <wolff@21st.de> - * @version $Id: MDB2.php,v 1.11 2004/06/07 19:51:15 arnaud Exp $ + * @version $Id: MDB2.php,v 1.12 2004/06/07 20:01:44 arnaud Exp $ * @package LiveUser * @category authentication */ class LiveUser_Auth_Container_MDB2 extends LiveUser_Auth_Common { /** - * dsn that was connected to - * @var object + * dsn to connect to + * * @access private + * @var string */ var $dsn = null; /** * disconnect - * @var object + * * @access private + * @var boolean */ - var $disconnect = null; + var $disconnect = false; /** * PEAR::MDB2 connection object - * @var object + * * @access private + * @var object */ var $dbc = null; /** * Auth table * Table where the auth data is stored. - * @var string + * * @access public + * @var string */ var $authTable = 'liveuser_users'; /** * Columns of the auth table. * Associative array with the names of the auth table columns. - * The 'user_id', 'handle' and 'passwd' fields have to be set. + * The 'auth_user_id', 'handle' and 'passwd' fields have to be set. * 'lastlogin' and 'is_active' are optional. * It doesn't make sense to set only one of the time columns without the * other. * - * @var array + * The type attribute is only useful when using MDB or MDB2. + * * @access public + * @var array */ var $authTableCols = array( 'required' => array( - 'auth_user_id' => array('name' => 'auth_user_id', 'type' => 'text'), - 'handle' => array('name' => 'handle', 'type' => 'text'), - 'passwd' => array('name' => 'passwd', 'type' => 'text'), + 'auth_user_id' => array('name' => 'auth_user_id', 'type' => ''), + 'handle' => array('name' => 'handle', 'type' => ''), + 'passwd' => array('name' => 'passwd', 'type' => ''), ), 'optional' => array( - 'lastlogin' => array('name' => 'lastlogin', 'type' => 'timestamp'), - 'is_active' => array('name' => 'is_active', 'type' => 'boolean') + 'lastlogin' => array('name' => 'lastlogin', 'type' => ''), + 'is_active' => array('name' => 'is_active', 'type' => '') ) ); /** - * LiveUser_Auth_Container_MDB2::LiveUser_Auth_Container_MDB2() - * * Class constructor. * - * @param mixed + * @access protected + * @param array configuration array + * @return void */ function &LiveUser_Auth_Container_MDB2(&$connectOptions) {
« previous php.pear.cvs (#20335) next »