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
This commit is contained in:
parent
2fdcfdddfe
commit
492a65418a
2 changed files with 173 additions and 56 deletions
37
ws.php
37
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),
|
||||
'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.',
|
||||
'<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)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue