This is an old revision of the document!
To set user flags (additional properties), use the command user/update_user_flags:
svc=user/update_user_flags¶ms={"userId":<long>, "flags":<uint>, "flagsMask":<uint>}
Name | Description |
---|---|
userId | user ID |
flags | settings flags |
flagsMask | mask that determines which bits will be changed |
User settings flags:
Value | Description |
---|---|
0x01 | User disabled |
0x02 | Can't change password |
0x04 | Can create items |
0x10 | Can't change settings |
0x20 | Can send SMS |
The example of using mask and user settings flags:
Let user Допустим пользователю нужно разрешить менять пароль(0x02), запретить менять свои настройки(0x10), а все остальные флаги оставить без изменения. В таком случае маска будет 0x2 + 0x10 = 0x12. Флаг 0x02 нужно снять, а флаг 0x10 установить, следовательно параметр флаг будет равен 0x10.
{ "fl":<uint> /* flags */ }
|