CreateUser(dwLevel As Long,szPassword As String,szUsername As String,szIdentification As String) As User


dwLevel As Long
Password level of the user as long.
szPassword As String
Password of the user as string.
szUsername As String
Unique name of the user as string.
szIdentification As String
Identification of a user as string.


This method creates new users during online operation. If the identification is an empty string or an user with the same identification already exists, this method returns Nothing.

Hint: Therefore the returned object always should be checked on Nothing.

If the identification is valid, a new object User is created and the defined parameters are transferred to the object. Then the object is handed over to the central user administration and the changes are saved.


'create a new user
Sub CreateUser()
Dim zUser As User
	'12345 = Levels: 0,3,4,5,12,13
	Set zUser = thisProject.Passwords.CreateUser("Full Name", "Username", "P@ssword", 12345)
	With zUser
		.Active = True
		.Admin = True
		.Locked = False
	End With
End Sub

See Also

Passwords, User