mng.DeleteUser

This job deletes a user from the DB table benutzer. Group assignments (bgrel), system roles (ossysroles), subscriptions (osabonnement), and personal settings (osconf) of the user are also deleted. Optionally, folders and mailbox content can be forwarded to another user.

1. Input Parameters

Name Type Required Description

Flags

INT

Yes

Indicates through which parameter the user is identified:
0 = sUser / sTarget
1 = sUserGuid / sTargetGuid
2 = sUserId / sTargetId

InheritanceFlags

INT

Yes

Indicates whether folders and mailbox content are forwarded:
0 = folders and mails are deleted
1 = folders are forwarded
2 = mails are forwarded
3 = folders and mails are forwarded

[sUser]

STRING

No

Username

[sUserGuid]

STRING

No

GUID of the user

[sUserId]

STRING

No

ID of the user

[sTarget]

STRING

No

Recipient username (receives folders/mails)

[sTargetGuid]

STRING

No

GUID of the recipient (receives folders/mails)

[sTargetId]

STRING

No

ID of the recipient (receives folders/mails)

2. Return Value

(INT): 0 = Job successful, otherwise error code.

3. Required System Role

This job modifies users or groups and therefore requires the calling user to hold system role 4 (Administrator: Configure security system). If this role is missing, the call is rejected with the error code -1040906164; the associated error text reads:

User {username} does not have permission to configure the security system. Please contact your administrator.

The system roles assigned to the calling user can be determined with mng.GetUserRoles; an overview of all roles is available under System Roles. See also Error Codes.