Shows the Login dialog.
[ bVerified = ] Object.ShowLoginDialog( [, hParent][,psToken][,sDefaultUserName] )
The ShowLoginDialog method syntax has the following parts:
Name |
Type |
Description |
Object |
AUsers |
AUsers object |
hwndParent |
Val AHandle |
Optional. Handle to the parent window |
psToken |
Var BString |
Optional. Returned user info: {filename+username+password} -encrypted string returned if this parameter is passed. |
sDefaultUserName |
Val BString |
Optional. Default user name displayed in the User name edit control. |
bVerified |
Bool |
A boolean expression that specifies whether the login was successful. |
bVerified can be one of the following values:
Value |
Description |
True * |
The login was successful. |
False |
The login was not successful. |
This procedure puts up a Login dialog which allows the user to enter his name and his password. It returns True if the Login is successful.
The function sets the CurrentUser to the new user
In the ATEasy version 6.0, the User info token string returned can be used to Log In the same user automatically.
The following example will show the Log In dialog:
if Users.ShowLoginDialog() = True then
print "Login was successful!"
...
endif
The following example will prompt for user/password and will return the user token from Login dialog and used later to Log in the same user with the token (v 6.0):
Users.ShowLoginDialog(, m_stData.bsUserToken)
...
bLogin=Users.Login(m_stData.bsUserToken, "")
CurrentUser, Login, ShowChangePasswordDialog, ShowUsersDialog, UseLoginDialog, ATEasy Login Dialog