Forum Moderators: coopster & phranque

Message Too Old, No Replies

How to check username logged in?

Checking user logged in via .htaccess

         

kidd

5:40 pm on Aug 4, 2002 (gmt 0)

10+ Year Member



Hello...

My site is protected via .htacces and .htpasswd

Im creating a script that makes a log of certain actions the users do while navigating in the protected directories.

The problem is, that for me to be able to do this I need to know by what username the user accesed the protected directories...

I hope Im making myself clear...I read somewhere that I could know this by seeing the $ENV{'REMOTE_USER'} variable, but its not working...

Could someone help me out...

Thanks

gettoefl

6:10 am on Aug 5, 2002 (gmt 0)

10+ Year Member




Kidd,

You need to make sure the script you are using to capture REMOTE_USER is protected under the same realm as the directory. Make some tests by just saying in your script

print "Hello", $ENV{REMOTE_USER};

Mark

kidd

1:41 pm on Aug 5, 2002 (gmt 0)

10+ Year Member



Wow...

Thanks for your answer...I was about to go crazy, but then I read your post.

I test it an it worked!...

Thanks a lot...