Is it possible to get the windows user logged in account first name and last name without getting into the active directory?
Asked
Active
Viewed 232 times
0
-
i think you cant do that with only pure PHP – vkatsitadze Jul 28 '15 at 07:11
-
Unfortunatly you can't – Hearner Jul 28 '15 at 07:11
-
that's not possible with PHP itself as PHP only workes on the Server itself and can only use the date the user sends. THe name which he hase in windows is not included in that. – DocRattie Jul 28 '15 at 07:15
1 Answers
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?
-
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