cvs: peardoc /en/package/authentication/auth intro.xml /en/package/authentication/auth/auth auth.xml
| From: | Adam Ashley | Date: | Thu, 21 Dec 2006 05:15:26 +0000 |
| Subject: | cvs: peardoc /en/package/authentication/auth intro.xml /en/package/authentication/auth/auth auth.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-9124@lists.php.net to get a copy of this message | ||
aashley Thu Dec 21 05:15:26 2006 UTC
Modified files:
/peardoc/en/package/authentication/auth intro.xml
/peardoc/en/package/authentication/auth/auth auth.xml
Log:
Add more documentation covering loginFunction callback function
http://cvs.php.net/viewvc.cgi/peardoc/en/package/authentication/auth/intro.xml?r1=1.15&r2=1.16&diff_format=u
Index: peardoc/en/package/authentication/auth/intro.xml
diff -u peardoc/en/package/authentication/auth/intro.xml:1.15
peardoc/en/package/authentication/auth/intro.xml:1.16
--- peardoc/en/package/authentication/auth/intro.xml:1.15 Sat Nov 11 16:43:39 2006
+++ peardoc/en/package/authentication/auth/intro.xml Thu Dec 21 05:15:26 2006
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.15 $ -->
+<!-- $Revision: 1.16 $ -->
<refentry id="package.authentication.auth.intro">
<refnamediv>
<refname>Introduction</refname>
@@ -19,7 +19,11 @@
<![CDATA[
require_once "Auth.php";
-function loginFunction()
+// Takes three arguments: last attempted username, the authorization
+// status, and the Auth object.
+// We won't use them in this simple demonstration -- but you can use them
+// to do neat things.
+function loginFunction($username = null, $status = null, &$auth = null)
{
/*
* Change the HTML output so that it fits to your
http://cvs.php.net/viewvc.cgi/peardoc/en/package/authentication/auth/auth/auth.xml?r1=1.14&r2=1.15&diff_format=u
Index: peardoc/en/package/authentication/auth/auth/auth.xml
diff -u peardoc/en/package/authentication/auth/auth/auth.xml:1.14
peardoc/en/package/authentication/auth/auth/auth.xml:1.15
--- peardoc/en/package/authentication/auth/auth/auth.xml:1.14 Mon Sep 11 03:52:24 2006
+++ peardoc/en/package/authentication/auth/auth/auth.xml Thu Dec 21 05:15:26 2006
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.14 $ -->
+<!-- $Revision: 1.15 $ -->
<refentry id="package.authentication.auth.auth.auth">
<refnamediv>
<refname>Auth::Auth()</refname>
@@ -38,7 +38,7 @@
</term>
<listitem>
<para>
- name of the storage driver that should be used,
+ Name of the storage driver that should be used,
alternatively you can pass a custom Auth_Container object.
</para>
</listitem>
@@ -50,7 +50,7 @@
</term>
<listitem>
<para>
- the options that are passed to the storage container
+ The options that are passed to the storage container.
</para>
</listitem>
</varlistentry>
@@ -61,8 +61,13 @@
</term>
<listitem>
<para>
- the name of a user-defined function that
- prints the login screen
+ The name of a user-defined function that
+ prints the login screen. This function is passed three parameters
+ when called $username, $status, &$auth.
+ These are in order the
+ previously attempted username, the status code that caused the
+ previous auth attempt to fail and a reference to the Auth object
+ itself.
</para>
</listitem>
</varlistentry>
@@ -73,8 +78,7 @@
</term>
<listitem>
<para>
- defines if the login is optional
- or not
+ Defines if the login is optional or not.
</para>
</listitem>
</varlistentry>
@@ -102,7 +106,7 @@
<?php
require_once "Auth/Auth.php";
-function myOutput($username, $status)
+function myOutput($username, $status, $auth)
{
... /* See first example in introduction for the full listing */
}