related to #1524 API username variication update

This commit is contained in:
Matthieu Leproux
2021-10-19 13:45:32 +02:00
parent c006b2222e
commit f0110cead6
+1 -1
View File
@@ -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');
}