Switch to: V12V11V10V9V8V7V6V5

VServer Class: User Methods

VServer.AddUser()

Declaration:

AddUser( 
    inUserName as String, 
    inPassword as String, 
    isAdmin as integer = FALSE ) 

Parameters:

  • inUserName - The user name.
  • inPassword - The password for this user.
  • isAdmin - TRUE if this user has administrator permissions.

Description:

Allows the administrator to add a new user to the Master Database.

Errors:

  • The user name already exists.
  • You are not the administrator.

Example:

server.AddUser( "Peter", "a1234fteg4" )

VServer.RemoveUser()

Declaration:

RemoveUser( inUserName as String ) 

Parameters:

  • inUserName - The user name.

Description:

Allows the administrator to remove a user from the Master Database.

Errors:

  • The user name is not found.
  • You are not the administrator.

Example:

server.RemoveUser( "Peter" )

VServer.ChangeUserPassword()

Declaration:

ChangeUserPassword( 
    inUserName as String, 
    inNewPassword as String ) 

Parameters:

  • inUserName - The user name.
  • inNewPassword - A new password for this user.

Description:

Allows the administrator to change the password of a user.

Errors:

  • The user name is not found.
  • You are not the administrator.

Example:

server.ChangeUserPassword( "Peter", "rvsa3341" ) 

VServer.GetUserName()

Declaration:

GetUserName( inUserIndex as Integer ) as String

Parameters:

  • inUserIndex - The user index.

Description:

Returns the name of a user specified by index.

Example:

name = server.GetUserName(i) 

VServer.GetUserIsAdmin()

Declaration:

GetUserIsAdmin( inUserIndex as Integer ) as Boolean

Parameters:

  • inUserIndex - The user index.

Description:

Returns TRUE if the specified user is an administrator.

Example:

isadmin = server.GetUserIsAdmin(i)