Skip to content

Commit

Permalink
Fix code not reachable
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed May 3, 2021
1 parent 1f31b58 commit 08dbe74
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions htdocs/user/class/api_users.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 08dbe74

Please sign in to comment.