PHP Authentication wierdness
| From: | Boget, Chris | Date: | Wed, 09 Aug 2000 21:07:19 +0000 |
| Subject: | PHP Authentication wierdness | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10994@lists.php.net to get a copy of this message | ||
I have the following functions:
function authenticateUser() {
global $realm;
Header( "WWW-authenticate: basic realm=\"$realm\"" );
Header( "HTTP/1.0 401 Unauthorized" );
}
function authorize() {
if( !$PHP_AUTH_USER ) {
authenticateUser();
exit;
}
}
Now, with the exit there, if I hit the CANCEL button on the
authentication dialogue box, it will prompt me twice more to
enter my authentication information. However, if I change
that "exit;" to a "return $whatever", I will only get prompted
the once and if I hit cancel that's it.
Why? I have no clue and I can't come up with any reasonable
explanation. It's not like there is a recursive function there
telling it to prompt 3 times... I'm at a loss.
Any info would be greatly appreciated!!
Chris