0

Is it possible to get the windows user logged in account first name and last name without getting into the active directory?

serenesat
  • 4,611
  • 10
  • 37
  • 53
glennjgalea
  • 1
  • 1
  • 1
  • 4

1 Answers1

0

PHP is a server-side programming language, you should be able to do that with a client-side programming language such as Javascript. I invite you to read the following topic on Programmers to clarify the situation: What are the differences between server-side and client-side programming?

The question has been discussed in this topic: Get Windows username with JavaScript?

Community
  • 1
  • 1
clapsus
  • 442
  • 6
  • 19
  • I was able to get the username of the logged user by using: shell_exec("echo %username%" ); – glennjgalea Jul 28 '15 at 07:51
  • This way, you'll get the username of the server, not of the client. If it is what's you're looking for, fine then, but this will not work on Linux servers. – clapsus Jul 28 '15 at 08:46