CreateUserEx(dwLevel1 As Long,dwLevel2 As Long,dwLevel3 As Long,szPassword As String,dwLevel4 As Long,szUsername As String,szIdentification As String) As User


dwLevel1 As Long
Password levels 0 to 31 of the user as long.
dwLevel2 As Long
Password levels 32 to 63 of the user as long.
dwLevel3 As Long
Password levels 64 to 95 of the user as long.
szPassword As String
Password of the user as string.
dwLevel4 As Long
Password levels 96 to 127 of the user as long.
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
	' 4711 = Levels: 32,33,34,37,38,41,44
	'  555 = Levels: 64,65,67,69,73
	' 1234 = Levels: 97,100,102,103,106
	Set zUser = thisProject.Passwords.CreateUserEx("LogonName", "Full Username", "P@ssword", 12345, 4711, 555, 1234)
	With zUser
		.Active = True
		.Admin = True
		.Locked = False
	End With
End Sub

See Also

Passwords, User