On Tue, 04 Apr 2000, Adam Gotheridge wrote:
> How do I get the username someone entered in a http authentication prompt?
>
> I got authDBI working, but I can't figure out hot to access the user name which
> was passed so that I can use it in further sql-dml statements.
Try this:
my $r = shift;
my ($res, $sent_pwd) = $r->get_basic_auth_pw;
return $res if $res; #decline if not Basic
my $user = $r->connection->user;
It works well for me, even if it might not be the most efficient way. It's
probably cribbed out of the eagle book, I never claimed it was original
--
Michael Finke
ScreamDesign.Com
(978)-579-0898 X240