cvs: peardoc /en/package/authentication/auth intro.xml
| From: | Martin Jansen | Date: | Sat, 29 Mar 2003 14:11:19 +0000 |
| Subject: | cvs: peardoc /en/package/authentication/auth intro.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-557@lists.php.net to get a copy of this message | ||
mj Sat Mar 29 09:11:19 2003 EDT
Modified files:
/peardoc/en/package/authentication/auth intro.xml
Log:
* Adding a new example.
Index: peardoc/en/package/authentication/auth/intro.xml
diff -u peardoc/en/package/authentication/auth/intro.xml:1.3
peardoc/en/package/authentication/auth/intro.xml:1.4
--- peardoc/en/package/authentication/auth/intro.xml:1.3 Sun Nov 3 12:30:10 2002
+++ peardoc/en/package/authentication/auth/intro.xml Sat Mar 29 09:11:18 2003
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="package.authentication.auth.intro">
<refnamediv>
<refname>Introduction</refname>
@@ -142,18 +142,33 @@
]]>
</programlisting>
</example>
- </para>
- <para>
- This is a pretty nice example for the optional login feature: The
- last parameter <parameter>$optional</parameter> can be either true
- or false. If it is false, the login form is not shown and the user
- only sees the text "Everybody can see this text!". If he clicks on
- the link above this text, he gets the same page but with the GET
- parameter "login=1". Now he can enter his login information in the
- login form. If he successfully logs in, he can then see the text
- "Everybody can see this text!" and the text "One can only see this
- if he is logged in!".
- </para>
+ This is a pretty nice example for the optional login feature: The
+ last parameter <parameter>$optional</parameter> can be either true
+ or false. If it is false, the login form is not shown and the user
+ only sees the text "Everybody can see this text!". If he clicks on
+ the link above this text, he gets the same page but with the GET
+ parameter "login=1". Now he can enter his login information in the
+ login form. If he successfully logs in, he can then see the text
+ "Everybody can see this text!" and the text "One can only see this
+ if he is logged in!".
+ </para>
+
+ <example>
+ <title>Logout functionality</title>
+ <simpara>
+ The following example performs a <quote>logout</quote> for the
+ current user and displays the login form again.
+ </simpara>
+ <programlisting role="php">
+$myauth->start();
+
+if ($_GET['action'] == "logout") {
+ $myauth->logout();
+ $myauth->start();
+}
+ </programlisting>
+ </example>
+
<para>
In the following passages we cover more detailed information about
the functions of PEAR::Auth.