Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:sidebar:remoteapi:apiref:user:update_user_flags [19/06/2013 14:07]
zuve
en:sidebar:remoteapi:apiref:user:update_user_flags [29/11/2013 13:31]
Line 1: Line 1:
-{{indexmenu_n>​7}} 
-====== Set user settings flags ====== 
  
-To set user flags (additional properties),​ use the command **user/​update_user_flags**: ​ 
-<code javascript>​ 
-svc=user/​update_user_flags&​params={"​userId":<​long>,​ 
-    "​flags":<​uint>,​ 
-    "​flagsMask":<​uint>​} 
-</​code>​ 
- 
-===== Parameters ===== 
-^ Name ^ Description ^ 
-| userId | user ID | 
-| flags | settings flags | 
-| flagsMask | mask that determines which bits will be changed | 
- 
-//User settings flags:// 
-^  Value  ^ Description ^ 
-|  0<​nowiki>​x</​nowiki>​01 ​ | User disabled | 
-|  0<​nowiki>​x</​nowiki>​02 ​ | Can't change password | 
-|  0<​nowiki>​x</​nowiki>​04 ​ | Can create items | 
-|  0<​nowiki>​x</​nowiki>​10 ​ | Can't change settings | 
-|  0<​nowiki>​x</​nowiki>​20 ​ | Can send SMS | 
-<​html>​ 
-<!-- 
-|  0<​nowiki>​x</​nowiki>​40 ​ | Administrator | 
---> 
-</​html>​ 
- 
- 
-**The example of using mask and user settings flags:** 
- 
-We need to allow user changing password (0x02), to forbid changing settings(0x10),​ and all the other flags leave without changes. In such case **mask will be 0<​nowiki>​x</​nowiki>​2 + 0<​nowiki>​x</​nowiki>​10 = 0<​nowiki>​x</​nowiki>​12**. Flag 0<​nowiki>​x</​nowiki>​02 must be removed, and flag 0<​nowiki>​x</​nowiki>​10 must be set, therefore **parameter flag will be 0<​nowiki>​x</​nowiki>​10**. 
- 
-===== Response ===== 
-<code javascript>​ 
-{ 
- "​fl":<​uint>​ /​* flags */ 
-} 
-</​code>​ 
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam