cvs: pear /LiveUser/Auth PEARAuth.php
| From: | Lukas Smith | Date: | Mon, 28 Nov 2005 19:54:59 +0000 |
| Subject: | cvs: pear /LiveUser/Auth PEARAuth.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-36580@lists.php.net to get a copy of this message | ||
lsmith Mon Nov 28 14:54:59 2005 EDT
Modified files:
/pear/LiveUser/Auth PEARAuth.php
Log:
- phpdoc fixes
- handle option user data properties in readUserData()
http://cvs.php.net/diff.php/pear/LiveUser/Auth/PEARAuth.php?r1=1.22&r2=1.23&ty=u
Index: pear/LiveUser/Auth/PEARAuth.php
diff -u pear/LiveUser/Auth/PEARAuth.php:1.22 pear/LiveUser/Auth/PEARAuth.php:1.23
--- pear/LiveUser/Auth/PEARAuth.php:1.22 Fri Nov 25 22:47:48 2005
+++ pear/LiveUser/Auth/PEARAuth.php Mon Nov 28 14:54:58 2005
@@ -40,7 +40,7 @@
* @author Bjoern Kraus <krausbn@php.net>
* @copyright 2002-2005 Markus Wolff
* @license http://www.gnu.org/licenses/lgpl.txt
- * @version CVS: $Id: PEARAuth.php,v 1.22 2005/11/26 03:47:48 lsmith Exp $
+ * @version CVS: $Id: PEARAuth.php,v 1.23 2005/11/28 19:54:58 lsmith Exp $
* @link http://pear.php.net/LiveUser
*/
@@ -84,9 +84,9 @@
/**
* Load the storage container
*
- * @param mixed Name of array containing the configuration.
- * @param string name of the container that should be used
- * @return boolean true on success or false on failure
+ * @param array Name of array containing the configuration.
+ * @param string name of the container that should be used
+ * @return boolean true on success or false on failure
*
* @access public
*/
@@ -112,9 +112,7 @@
}
/**
- * 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.
+ * Does nothing
*
* @return boolean true on success or false on failure
*
@@ -126,6 +124,7 @@
}
/**
+ * Reads user data from the given data source
* Starts and verifies the PEAR::Auth login process
*
* @return boolean true upon success or false on failure
@@ -142,11 +141,17 @@
return null;
}
- $this->propertyValues['handle'] = $this->pearAuth->getUsername();
- $this->propertyValues['passwd'] =
$this->encryptPW($this->pearAuth->password);
- $this->propertyValues['is_active'] = true;
- $this->propertyValues['auth_user_id'] = $this->pearAuth->getUsername();
- $this->propertyValues['lastlogin'] = '';
+ $this->propertyValues['handle'] = $this->pearAuth->getUsername();
+ $this->propertyValues['passwd'] =
$this->encryptPW($this->pearAuth->password);
+ if (!isset($this->tables['users']['fields']['is_active']))
{
+ $this->propertyValues['is_active'] = true;
+ }
+ if
(!isset($this->tables['users']['fields']['auth_user_id'])) {
+ $this->propertyValues['auth_user_id'] =
$this->pearAuth->getUsername();
+ }
+ if (!isset($this->tables['users']['fields']['lastlogin']))
{
+ $this->propertyValues['lastlogin'] = null;
+ }
return true;
}