Forum Moderators: coopster

Message Too Old, No Replies

get *nix user name

can php retrieve the username?

         

mayurapilly

11:00 pm on Apr 21, 2007 (gmt 0)

10+ Year Member



The title says it all. Can PHP retrieve a *nix username after someone has logged into a site via a .htaccess restriction?

I have an application that has several users. Each user gets their own database based on the login username. Works well.

Problem is that if user1 logs in via sub1.domain.com and then types sub2.domain.com into browser they have access to sub2.domain.com and that database.

I understand why it is happening, but am fairly new to .htaccess so not sure how to prevent it. But...if PHP can get the username...problem is easily solved.

jatar_k

1:29 am on Apr 22, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld mayurapilly,

maybe this link will help

[php.net...]