From 492a65418a68023314ff036668e3aedc8f0bef02 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Mon, 28 Oct 2013 17:20:34 +0000 Subject: 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 --- ws.php | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) (limited to 'ws.php') 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), - ), - 'Admin & POST only. 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), + ), + 'Admin & POST only. Updates a user. Leave a field blank to keep the current value. +
"username", "password" and "email" are ignored if "user_id" is an array.', null, array('admin_only'=>true, 'post_only'=>true) ); -- cgit v1.2.3