diff --git a/include/ws_functions/pwg.users.php b/include/ws_functions/pwg.users.php index 843998952..62ec8759e 100644 --- a/include/ws_functions/pwg.users.php +++ b/include/ws_functions/pwg.users.php @@ -497,7 +497,7 @@ function ws_users_setInfo($params, &$service) return new PwgError(403, 'Invalid security token'); } - if (strlen(str_replace( " ", "", $params['username'])) == 0) { + if (isset($params['username']) and strlen(str_replace( " ", "", $params['username'])) == 0) { return new PwgError(WS_ERR_INVALID_PARAM, 'Name field must not be empty'); }