cvs: peardoc /fr/package/authentication/auth intro.xml

From: Date: Sat, 22 Oct 2005 08:10:25 +0000
Subject: cvs: peardoc /fr/package/authentication/auth intro.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-7028@lists.php.net to get a copy of this message
moosh Sat Oct 22 04:10:25 2005 EDT Modified files: /peardoc/fr/package/authentication/auth intro.xml Log: - sync to EN-1.9 1.9 : Fix logout example to avoid downle login screen in some cases http://cvs.php.net/diff.php/peardoc/fr/package/authentication/auth/intro.xml?r1=1.2&r2=1.3&ty=u Index: peardoc/fr/package/authentication/auth/intro.xml diff -u peardoc/fr/package/authentication/auth/intro.xml:1.2 peardoc/fr/package/authentication/auth/intro.xml:1.3 --- peardoc/fr/package/authentication/auth/intro.xml:1.2 Mon Jun 6 18:40:48 2005 +++ peardoc/fr/package/authentication/auth/intro.xml Sat Oct 22 04:10:24 2005 @@ -1,12 +1,12 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- EN-Revision: 1.8 Maintainer: moosh Status: start --> <refentry id="package.authentication.auth.intro"> <refnamediv> <refname>Introduction</refname> - <refpurpose>A usage example</refpurpose> + <refpurpose>Un exemple d'utilisation</refpurpose> </refnamediv> <refsect1 id="packages.authentication.auth.intro.example"> - <title>Auth tutorial</title> + <title>tutorial de Auth</title> <simpara> Our goal during this "mini tutorial" is to set up a system that secures your site with an easy to use authentication mechanism. @@ -18,7 +18,7 @@ <title>Typical usage example for <classname>PEAR::Auth</classname></title> <programlisting role="php"> <![CDATA[ -require_once "Auth/Auth.php"; +require_once "Auth.php"; function loginFunction() { @@ -59,9 +59,7 @@ <para> <warning> <simpara> - You can change all the HTML formatting in the function, but you - cannot change the names of the input boxes in the form. They have - to be <literal>username</literal> and <literal>password</literal>. + <!-- Put example here for using custom post fields --> </simpara> </warning> </para> @@ -78,15 +76,23 @@ parameter defines the name of the storage container. Because we want to use a database driven storage container, we pass "DB" here. The second parameter is the connection parameter for the - container driver. We use the previously defined DSN string. The - third parameter is the name of our function that we defined at the - beginning of the script. It prints the login form. + container driver. + + We use the previously defined DSN string. + + The third parameter is the name of our function that we defined at the + beginning of the script. + + It prints the login form. </para> <para> Now our authentication object is initialized and we need to check - if the user is logged in. This is done via the method - <function>getAuth</function>. If it returns &true;, we can pass the - content of our page to the user. + if the user is logged in. + + This is done via the method + <function>checkAuth</function>. + + If it returns &true;, we can pass the content of our page to the user. </para> <para> <warning> @@ -167,11 +173,8 @@ current user and displays the login form again. </simpara> <programlisting role="php"> -$myauth->start(); - -if ($_GET['action'] == "logout") { +if ($_GET['action'] == "logout" && $myauth->checkAuth()) { $myauth->logout(); - $myauth->start(); } </programlisting> </example>

« previous php.pear.doc (#7028) next »