mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Fix code not reachable
This commit is contained in:
@@ -312,7 +312,6 @@ class Users extends DolibarrApi
|
||||
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 @@ class Users extends DolibarrApi
|
||||
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)) {
|
||||
|
||||
Reference in New Issue
Block a user