/    Sign up×
Community /Pin to ProfileBookmark

How to identify Windows userid?

I’m doing some work on a corporate server (Win2k3), and would like to know if there’s any way to catch the windows login userid of the user for a session.

Can anyone tell me how to do this?

Thanks,

Rob

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYNov 03.2005 — i believe you can't in php, but looks like it's possible in java http://forum.java.sun.com/thread.jspa?threadID=668707&messageID=3914507
Copy linkTweet thisAlerts:
@ShrineDesignsNov 03.2005 — on the server the username is in the $_ENV variable, i know on win 2k it is $_ENV['USERNAME'] use <?php phpinfo(); ?> or <?php print_r($_ENV); ?>

someone asked this question a few days ago, as far as i know it is not possible to get the username of a clients system (unless it is for some reason being sent through the headers or something)
×

Success!

Help @scaiferw spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...