CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Help!REMOTE_USER?

 



patyr
Deleted

Apr 12, 2000, 10:19 PM

Post #1 of 3 (445 views)
Help!REMOTE_USER? Can't Post

Firstly, sorry about my English...
How can I know if the authentification has been done? It's with "REMOTE_USER", isn't? Help me with the code, please!

Thanks,
Patricia


Cretep
User

Apr 13, 2000, 6:43 PM

Post #2 of 3 (445 views)
Re: Help!REMOTE_USER? [In reply to] Can't Post

Hi
Yes REMOTE_USER will carry the user name once they have been authenticated by .htaccess. Heres a little snippet of code that will see if the user was authenticated or not.

# If $ENV{'REMOTE_USER'} is empty there was no authentication
if ($ENV{'REMOTE_USER'} eq ""){
&no_access; #This will give the unauthenticated user a response by calling the subroutine no_access
}
# Elese if $ENV{'REMOTE_USER'} is full, call the subroutine access
else{
&access;
}

Regards
Peter Crouch


Cure
User

Apr 13, 2000, 11:32 PM

Post #3 of 3 (445 views)
Re: Help!REMOTE_USER? [In reply to] Can't Post

Hi

$ENV{'REMOTE_USER'} or $ENV{'AUTH_USER'}
will tell you if a user(s) have entered their username and password in a .htaccess

Example

if ($ENV{'REMOTE_USER'} or $ENV{'AUTH_USER'})
&go_away; #user has not been authentification
else{
&come_in; #user has been authentification
}


Cure

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives