ADMIN_User_InsertUpdate

 Show all Hide all

Deprecated.

Creates a new user or updates an existing one.

Type: Stored procedure
Area of use: General use

Parameters:

@GUIMode optional bit
Indicates that the procedure is being called from Softadmin®, which means that cache result sets and Softadmin error handling (admin_message etc...) is used. Set this flag to 0 when not calling it from a menu item. This flag is on by default.
@id mandatory int
User ID. OUTPUT parameter
Possible value Description
n Update user with this id
NULL Create new user. The new user's identity is returned in the parameter
@UserName mandatory varchar(50)
@Password mandatory nvarchar(50)
The user's password. Can also be updated using ADMIN_User_UpdatePassword.
Possible value Description
#SAME# Leave the existing password unchanged
NULL A user with a NULL password is not able to log in via the login page. Typically used for special user accounts handled by the system.
xxx User's new password. No validation will be run on this password, if you need to validate it, do so before calling ADMIN_User_InsertUpdate
@UserNameFirst mandatory varchar(50)
@UserNameLast mandatory varchar(50)
@UserEmail mandatory varchar(100)
@RoleID mandatory int
@LanguageID optional int
Defaults to id 1 when inserting and to the user's current language when updating.
@Administrator optional int
If the user is a Softadmin®-administrator. You should not allow customers to update or create these users. Always defaults to 0
@HelpAdministrator optional bit
Defaults to 0 when inserting and to the user's current help administrator status when updating.
@MaintenanceUserRightsID optional int
Defaults to 2 when inserting and to the user's current rights when updating.
@Enabled optional bit
Defaults to 1 when inserting and the user's current enabled state when updating.
@PasswordHasExpired optional bit
If the user will be forced to change password the next time he logs in. Can also be updated using ADMIN_User_UpdatePassword. Defaults to 0 when inserting and the user's current password state when updating.