Login Method (AUsers)

Log in the specified use and set the CurrentUser to the new user.

Syntax

[ bVerified = ] Object.Login ( sName/bsUserToken, sPassword[, psToken] )

The Login method syntax has the following parts:

 

Name

Type

Description

Object

AUsers

AUsers object

sNameOrToken
(v6.0 new)

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
(v10 156d new)

 

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.

Where

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.

Comments

This procedure checks to see if the specified user name exists with this password. If it does, it returns True. Otherwise it returns False.

Example

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, "")

Applies to

AUsers

See Also

CurrentUser, AddUser, RemoveUser, Users, UsersCount, ShowLoginDialog