cvs: pear /Auth Auth.php
| From: | Martin Jansen | Date: | Sat, 22 Dec 2001 15:06:15 +0000 |
| Subject: | cvs: pear /Auth Auth.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1660@lists.php.net to get a copy of this message | ||
mj Sat Dec 22 10:06:15 2001 EDT
Modified files:
/pear/Auth Auth.php
Log:
* The second parameter for setAuth() can now be of any type.
* PHPDoc fixes.
Index: pear/Auth/Auth.php
diff -u pear/Auth/Auth.php:1.22 pear/Auth/Auth.php:1.23
--- pear/Auth/Auth.php:1.22 Sat Dec 22 09:55:25 2001
+++ pear/Auth/Auth.php Sat Dec 22 10:06:15 2001
@@ -16,7 +16,7 @@
// | Authors: Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Auth.php,v 1.22 2001/12/22 14:55:25 mj Exp $
+// $Id: Auth.php,v 1.23 2001/12/22 15:06:15 mj Exp $
//
/**
@@ -130,7 +130,7 @@
*
* @author Martin Jansen <mj@php.net>
* @package Auth
- * @version $Revision: 1.22 $
+ * @version $Revision: 1.23 $
*/
define("AUTH_IDLED", -1);
@@ -216,6 +216,7 @@
*
* @param string Name of the function that creates the login form
* @param boolean Should the login form be displayed if neccessary?
+ * @return void
*/
function Auth($storageDriver = "DB", $options = "", $loginFunction =
"", $showLogin = true)
{
@@ -266,6 +267,7 @@
* @access private
* @global $HTTP_POST_VARS
* @see Auth
+ * @return void
*/
function assignData()
{
@@ -287,6 +289,7 @@
* Start new auth session
*
* @access public
+ * @return void
*/
function start()
{
@@ -306,6 +309,7 @@
* Login function
*
* @access private
+ * @return void
*/
function login()
{
@@ -340,6 +344,7 @@
* @access public
* @param integer time in seconds
* @param bool add time to current expire time or not
+ * @return void
*/
function setExpire($time, $add = false)
{
@@ -410,10 +415,12 @@
*
* @access public
* @param string Username
- * @param array Additional information that is stored in
- * the session.
+ * @param mixed Additional information that is stored in
+ * the session. This parameter can have any
+ * type (integer, string, array etc).
+ * @return void
*/
- function setAuth($username, $data = array())
+ function setAuth($username, $data = null)
{
$session = &Auth::_importGlobalVariable("session");
@@ -457,6 +464,7 @@
*
* @access public
* @param bool show login form or not
+ * @return void
*/
function setShowLogin($showLogin = true)
{
@@ -477,6 +485,7 @@
* @access private
* @global $HTTP_SERVER_VARS
* @param string Username if already entered
+ * @return void
*/
function drawLogin($username = "")
{
@@ -527,6 +536,7 @@
* active session
*
* @access public
+ * @return void
*/
function logout()
{
@@ -545,6 +555,7 @@
* Update the idletime
*
* @access private
+ * @return void
*/
function updateIdle()
{
@@ -607,6 +618,8 @@
* @param string Username
* @param string Password
* @param mixed Additional parameters
+ * @return mixed True on success, PEAR error object on error
+ * and AUTH_METHOD_NOT_SUPPORTED otherwise.
*/
function addUser($username, $password, $additional = "")
{
@@ -621,6 +634,8 @@
*
* @access public
* @param string Username
+ * @return mixed True on success, PEAR error object on error
+ * and AUTH_METHOD_NOT_SUPPORTED otherwise.
*/
function removeUser($username)
{