update_user_flags

To set user flags (additional properties), use the command user/update_user_flags:

Copied!
svc=user/update_user_flags&params={"userId":<long>,
				   "flags":<uint>,
				   "flagsMask":<uint>}

Parameters

The required parameters are marked with an asterisk (*).

Name

Description

userId*

User ID.

flags*

Setting flags. See below.

flagsMask*

Mask which determines what bits will be changed.

The user setting flags are as follows:

Value

Description

0x01

User disabled.

0x02

Can't change password.

0x04

Can create items.

0x10

Can't change settings.

0x20

Can send SMS.

0x40Administrator.

Example of using the mask and flags

We need to allow a user to change their password (0x02), forbid to change the settings (0x10), and leave all the other flags without changes. In this case, the mask will be 0x2+0x10=0x12. The flag 0x02 must be removed, and the flag 0x10 must be set, therefore, the parameter flag will be 0x10.

Response

Copied!
{
	"fl":<uint>	/* flags */
}

Error codes

Error codeDescription
6Failed to update flags.
7Failed to fetch the user with ACL (ADF_ACL_USER_EDIT_FLAGS), or failed to fetch the user's creator, or incorrect flags were provided.
Download PDF file
Download Word document

See also