userid: who loged in Windows
Moderator: General Moderators
userid: who loged in Windows
Hi,
Is it possible to use the client side (userid: who loged in Windows) to fill the field userid for a authentification ?
Thank's
Is it possible to use the client side (userid: who loged in Windows) to fill the field userid for a authentification ?
Thank's
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Using PHP, you can only get environment details of the local machine using the $_ENV variable.
On the client, it is possible in IE using an ActiveX object, but depending on the security level, they will be asked if they wish to run the ActiveX object.
Anyway, try the following:
Good luck.
On the client, it is possible in IE using an ActiveX object, but depending on the security level, they will be asked if they wish to run the ActiveX object.
Anyway, try the following:
Code: Select all
<html>
<head>
<script language="JavaScript">
<!--
function GetUserName ()
{
var WshShell = new ActiveXObject("Wscript.Shell");
var WshEnv = WshShell.Environment("Process");
var sUserName = WshEnv.Item("UserName");
return sUserName;
}
window.onload = function () {document.login_form.username.value = GetUserName();}
-->
</script>
</head>
<body>
<form name="login_form">
Username: <input type="text" name="username" value="" />
<br/>
Password: <input type="password" name="password" />
<input type="submit">
</form>
</body>
</html>- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK