aboutsummaryrefslogtreecommitdiffstats
path: root/ws.php
diff options
context:
space:
mode:
Diffstat (limited to 'ws.php')
-rw-r--r--ws.php39
1 files changed, 28 insertions, 11 deletions
diff --git a/ws.php b/ws.php
index 2ae44a5bf..959722a26 100644
--- a/ws.php
+++ b/ws.php
@@ -846,17 +846,34 @@ function ws_addDefaultMethods( $arr )
'pwg.users.setInfo',
'ws_users_setInfo',
array(
- 'user_id' => array('type'=>WS_TYPE_ID),
- 'username' => array('flags'=>WS_PARAM_OPTIONAL),
- 'password' => array('flags'=>WS_PARAM_OPTIONAL),
- 'email' => array('flags'=>WS_PARAM_OPTIONAL),
- 'status' => array('flags'=>WS_PARAM_OPTIONAL,
- 'info'=>'generic,normal,admin'),
- 'level'=> array('flags'=>WS_PARAM_OPTIONAL,
- 'maxValue'=>max($conf['available_permission_levels']),
- 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE),
- ),
- '<b>Admin & POST only.</b> Updates a user. Leave a field blank to keep the current value.',
+ 'user_id' => array('flags'=>WS_PARAM_FORCE_ARRAY,
+ 'type'=>WS_TYPE_ID),
+ 'username' => array('flags'=>WS_PARAM_OPTIONAL),
+ 'password' => array('flags'=>WS_PARAM_OPTIONAL),
+ 'email' => array('flags'=>WS_PARAM_OPTIONAL),
+ 'status' => array('flags'=>WS_PARAM_OPTIONAL,
+ 'info'=>'generic,normal,admin'),
+ 'level'=> array('flags'=>WS_PARAM_OPTIONAL,
+ 'maxValue'=>max($conf['available_permission_levels']),
+ 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE),
+ 'language' => array('flags'=>WS_PARAM_OPTIONAL),
+ 'theme' => array('flags'=>WS_PARAM_OPTIONAL),
+ // bellow are parameters removed in a future version
+ 'nb_image_page' => array('flags'=>WS_PARAM_OPTIONAL,
+ 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE|WS_TYPE_NOTNULL),
+ 'recent_period' => array('flags'=>WS_PARAM_OPTIONAL,
+ 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE),
+ 'expand' => array('flags'=>WS_PARAM_OPTIONAL,
+ 'type'=>WS_TYPE_BOOL),
+ 'show_nb_comments' => array('flags'=>WS_PARAM_OPTIONAL,
+ 'type'=>WS_TYPE_BOOL),
+ 'show_nb_hits' => array('flags'=>WS_PARAM_OPTIONAL,
+ 'type'=>WS_TYPE_BOOL),
+ 'enabled_high' => array('flags'=>WS_PARAM_OPTIONAL,
+ 'type'=>WS_TYPE_BOOL),
+ ),
+ '<b>Admin & POST only.</b> Updates a user. Leave a field blank to keep the current value.
+<br>"username", "password" and "email" are ignored if "user_id" is an array.',
null,
array('admin_only'=>true, 'post_only'=>true)
);