Index: trunk/include/ws_functions.inc.php
===================================================================
--- trunk/include/ws_functions.inc.php	(revision 25117)
+++ trunk/include/ws_functions.inc.php	(revision 25118)
@@ -3217,5 +3217,5 @@
     array(
       'name' => $params['name'],
-      'is_default' => $params['is_default'],
+      'is_default' => boolean_to_string($params['is_default']),
       )
     );
@@ -3313,5 +3313,5 @@
   if ($params['is_default'] !== null)
   {
-    $updates['is_default'] = $params['is_default'];
+    $updates['is_default'] = boolean_to_string($params['is_default']);
   }
   
@@ -3555,5 +3555,5 @@
 function ws_users_setInfo($params, &$service)
 {
-  global $conf;
+  global $conf, $user;
   
   include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
@@ -3564,5 +3564,5 @@
   }
   
-  $updates = array();
+  $updates = $updates_infos = array();
   $params = array_map('trim', $params);
   
@@ -3593,4 +3593,30 @@
   {
     $updates[ $conf['user_fields']['password'] ] = $conf['password_hash']($params['password']);
+  }
+  
+  if (!empty($params['status']))
+  {
+    if ( $params['status'] == 'webmaster' and !is_webmaster() )
+    {
+      return new PwgError(403, 'Only webmasters can grant "webmaster" status');
+    }
+    if ( $user['id'] == $params['user_id'] )
+    {
+      $params['status'] = $user['status'];
+    }
+    if ( $conf['guest_id'] == $params['user_id'] )
+    {
+      $params['status'] = 'guest';
+    }
+    $updates_infos['status'] = $params['status'];
+  }
+  
+  if ($params['level'] !== null)
+  {
+    if ( !in_array($params['level'], $conf['available_permission_levels']) )
+    {
+      return new PwgError(WS_ERR_INVALID_PARAM, 'Invalid level');
+    }
+    $updates_infos['level'] = $params['level'];
   }
   
@@ -3600,4 +3626,10 @@
     array($conf['user_fields']['id'] => $params['user_id'])
     );
+    
+  single_update(
+    USER_INFOS_TABLE,
+    $updates_infos,
+    array('user_id' => $params['user_id'])
+    );
 
   return $service->invoke('pwg.users.getList', array('user_id' => $params['user_id']));
Index: trunk/ws.php
===================================================================
--- trunk/ws.php	(revision 25117)
+++ trunk/ws.php	(revision 25118)
@@ -708,8 +708,7 @@
       'ws_groups_getList',
       array(
-        'group_id' => array('default'=>null,
-                            'flags'=>WS_PARAM_FORCE_ARRAY,
+        'group_id' => array('flags'=>WS_PARAM_OPTIONAL|WS_PARAM_FORCE_ARRAY,
                             'type'=>WS_TYPE_ID),
-        'name' =>     array('default'=>null,
+        'name' =>     array('flags'=>WS_PARAM_OPTIONAL,
                             'info'=>'Use "%" as wildcard.'),
         'per_page' => array('default'=>100,
@@ -756,6 +755,6 @@
       array(
         'group_id' =>   array('type'=>WS_TYPE_ID),
-        'name' =>       array('default'=>null),
-        'is_default' => array('default'=>null,
+        'name' =>       array('flags'=>WS_PARAM_OPTIONAL),
+        'is_default' => array('flags'=>WS_PARAM_OPTIONAL,
                               'type'=>WS_TYPE_BOOL),
         ),
@@ -795,17 +794,14 @@
       'ws_users_getList',
       array(
-        'user_id' =>    array('default'=>null,
-                              'flags'=>WS_PARAM_FORCE_ARRAY,
+        'user_id' =>    array('flags'=>WS_PARAM_OPTIONAL|WS_PARAM_FORCE_ARRAY,
                               'type'=>WS_TYPE_ID),
-        'username' =>   array('default'=>null,
+        'username' =>   array('flags'=>WS_PARAM_OPTIONAL,
                               'info'=>'Use "%" as wildcard.'),
-        'status' =>     array('default'=>null,
-                              'flags'=>WS_PARAM_FORCE_ARRAY,
+        'status' =>     array('flags'=>WS_PARAM_OPTIONAL|WS_PARAM_FORCE_ARRAY,
                               'info'=>'guest,generic,normal,admin,webmaster'),
         'min_level' =>  array('default'=>0,
                               'maxValue'=>max($conf['available_permission_levels']),
                               'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE),
-        'group_id' =>   array('default'=>null,
-                              'flags'=>WS_PARAM_FORCE_ARRAY,
+        'group_id' =>   array('flags'=>WS_PARAM_OPTIONAL|WS_PARAM_FORCE_ARRAY,
                               'type'=>WS_TYPE_ID),
         'per_page' =>   array('default'=>100,
@@ -852,7 +848,12 @@
       array(
         'user_id' =>  array('type'=>WS_TYPE_ID),
-        'username' => array('default'=>null),
-        'password' => array('default'=>null),
-        'email' =>    array('default'=>null),
+        '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.',
