3
I need a code that captures the username logged in to windows. I know it’s possible to do Activex, but only works for versions of IE 7 down.
I am also aware that there are java functions like getProperty()
that captures the user name, but needed the code in HTML, Javascript or PHP (provided it captures the information from the user’s machine and not from the server).
Note: The code does not need to run on all browsers, only on IE11 is sufficient.
@Lipespry: It was good editing, I appreciate it, but if I run the code on the page it goes through a proxy that does not support the object in question.
– Augusto Vasques
Yeah, I put it on the snipper only for IE users. If it doesn’t work, it’s fair to take it out of the snippet! Any non-conformity, can revert there in the revision! ;D
– LipESprY
It actually works on IE11, but activeX has to be enabled and many users do not have privileges for it (corporate computer). I’m trying to capture by AD, suggestions and ideas are welcome.
– O Estudante
@Oestudante: I’ve never tried them in server side, but try these commands in PHP
<?php echo get_current_user(); ?>
and<?php echo getenv("username"); ?>
, will that work.– Augusto Vasques