Set user settings flags

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

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

Parameters

Name Description
userId user ID
flags settings flags
flagsMask mask that determines which bits will be changed

User settings flags:

Флаг Значение
0x01 User disabled
0x02 Can't change password
0x04 Can create items
0x08 Skip ACL propagation (if user has this flag while his child is creating some item, current user will not have any access to created item)
0x10 Can't change settingsи
0x20 Can send SMS

The example of using mask and user settings flags:

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

Response

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

Errors

Code Value
1 invalid session
2 invalid service name
3 invalid result
4 invalid format or value of parameters
7 access denied
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2019 Gurtam