GetUserPwdAging

The function GetUserPwdAging gets the age of the password for a specified user — that is, the time remaining until the password expires, or if it has expired, the time since it expired.

Function Group Execution Windows Embedded Thin Client Mobile Access
GetUserPwdAging Security Synchronous Supported Supported Supported Not supported

Syntax

  GetUserPwdAging(strUser)  
Web Studio Help ns security getuserpwdaging.xml d421177e101 GetUserPwdAging
strUser
The name of the user.

Returned value

This function returns the following possible values:
Value Description
less than 0 Number of hours since the password expired.
0 The specified user is not logged on.
greater than 0 Number of hours until the password expires.
Note: If the function is not executed correctly (e.g., if the specified user name is invalid), or if the specified user is not logged on, then the function also returns BAD quality.

Examples

Get the age of the password for the user “John”:
  GetUserPwdAging("John")  
Get the age of the password for the user who is currently logged on:
  GetUserPwdAging(UserName)  

GetUserPwdAging