aboutsummaryrefslogtreecommitdiffstats
path: root/ws.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-10-28 17:20:34 +0000
committermistic100 <mistic@piwigo.org>2013-10-28 17:20:34 +0000
commit492a65418a68023314ff036668e3aedc8f0bef02 (patch)
treeeaa9b0f836403813c6b9f185623ada0b907289d6 /ws.php
parent2fdcfdddfecb66c7d654004cd1d44ceb6a1233c7 (diff)
feature 2976: new options for pwg.users.setInfo + user_id can be an array
git-svn-id: http://piwigo.org/svn/trunk@25195 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-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)
);