From 08dbe74643e93220dbf6fe33418d52b136e194c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 May 2021 01:10:53 +0200 Subject: [PATCH] Fix code not reachable --- htdocs/user/class/api_users.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index 784a61d5fa805..f5f0b73a70fc8 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -312,7 +312,6 @@ public function post($request_data = null) if (in_array($field, array('pass_crypted', 'pass_indatabase', 'pass_indatabase_crypted', 'pass_temp', 'api_key'))) { // This properties can't be set/modified with API throw new RestException(401, 'The property '.$field." can't be set/modified using the APIs"); - continue; } /*if ($field == 'pass') { if (empty(DolibarrApiAccess::$user->rights->user->user->password)) { @@ -366,7 +365,6 @@ public function put($id, $request_data = null) if (in_array($field, array('pass_crypted', 'pass_indatabase', 'pass_indatabase_crypted', 'pass_temp', 'api_key'))) { // This properties can't be set/modified with API throw new RestException(401, 'The property '.$field." can't be set/modified using the APIs"); - continue; } if ($field == 'pass') { if ($this->useraccount->id != DolibarrApiAccess::$user->id && empty(DolibarrApiAccess::$user->rights->user->user->password)) {