getting current login user name 
Author Message
 getting current login user name

Hello all,
does anyone know how I can get the name of the current logged in user from
jscript? Any input would be greatly appreciated. Thanks.


Fri, 13 May 2005 08:25:12 GMT  
 getting current login user name
Not sure if you can get the NTLogin using JScript, but you can fake it using
asp and VBScript:

function getNTLogin()
{
    return '<%=Request.ServerVariables("LOGON_USER")%>';

Quote:
}

when the page renders, the user's logon will be enclosed in the single
quotes.

Steve


Quote:
> Hello all,
> does anyone know how I can get the name of the current logged in user from
> jscript? Any input would be greatly appreciated. Thanks.



Fri, 13 May 2005 12:04:19 GMT  
 getting current login user name


Quote:
> Hello all,
> does anyone know how I can get the name of the current logged in user from
> jscript? Any input would be greatly appreciated. Thanks.

It's in the UserName property of the WshNetwork object:

var objWshNetwork = new ActiveXObject("WScript.Network");
var strUserName = objWshNetwork.UserName;

Xlnt



Fri, 20 May 2005 07:58:40 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Getting NT User Login Name

2. Getting the user's logon name and computer name

3. Getting the name of the current VBS file

4. Getting the name of the current file in asp

5. Getting Current User's DN?

6. HELP getting current logged user !!!

7. the current NT user name?

8. Domain Login user name retrieval

9. Full user name from NT login ID

10. Check the User Name in Login script

11. Users full name i login script

12. user name in login script

 

 
Powered by phpBB® Forum Software