Log in the specified use and set the CurrentUser to the new user.
[ bVerified = ] Object.Login ( sName/bsUserToken, sPassword[, psToken] )
The Login method syntax has the following parts:
Name |
Type |
Description |
Object |
AUsers |
AUsers object |
sNameOrToken |
Val BString |
The user's name or user's encrypted token string: {filename+username+password} that ShowLoginDialog or prior Login calls returned. |
sPassword |
Val BString |
The user's password |
psToken |
|
Optional. Return the user's name or user's encrypted token string: {filename+username+password}. |
bVerified |
Bool |
A boolean expression that specifies whether the user was logged in. |
bVerified can be one of the following:
Value |
Description |
True * |
The user with this password exists. |
False |
The user with this password does not exist. |
This procedure checks to see if the specified user name exists with this password. If it does, it returns True. Otherwise it returns False.
The following example will login a user named "Smith" with a password of "xyz":
if users.Login("Smith","xzy")=True then
print "LoggedOn"
....
endif
The following example will return the user token from Log in dialog and used later to Log in the same user with the token (v.6.0 new):
Users.ShowLoginDialog(, m_stData.bsUserToken)
...
bLogin=Users.Login(m_stData.bsUserToken, "")
CurrentUser, AddUser, RemoveUser, Users, UsersCount, ShowLoginDialog