Auth and AUTH_WRONG_LOGIN
| From: | Morten Therkildsen | Date: | Sun, 25 Jan 2004 18:57:07 +0000 |
| Subject: | Auth and AUTH_WRONG_LOGIN | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-10345@lists.php.net to get a copy of this message | ||
Hi all
In the documentation for Auth and the login example:
http://pear.php.net/manual/en/package.authentication.auth.intro.php
I wonder how to get the loginfunction work with AUTH_WRONG_LOGIN.
This is not working:
===========
function loginFunction()
{
/**
* Change the HTML output so that it fits to your
* application.
*/
if(!empty($myAuth->getStatus) &&
$myAuth->getstatus == AUTH_WRONG_LOGIN)
{
echo "Your password or username is wrong";
}
echo "<form method=\"post\" action=\"" .
$_SERVER['PHP_SELF'] . "\">";
echo "<input type=\"text\" name=\"username\">";
echo "<input type=\"password\" name=\"password\">";
echo "<input type=\"submit\">";
echo "</form>";
}
$myAuth = new Auth("DB", $dsn, "loginFunction");
Morten Therkildsen