mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
ref
This commit is contained in:
@@ -33,12 +33,10 @@ use Espo\Core\Exceptions\Error;
|
||||
use Espo\Core\Exceptions\NotFound;
|
||||
use Espo\Core\Exceptions\Forbidden;
|
||||
use Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
use Espo\Services\User as Service;
|
||||
|
||||
use Espo\Core\Api\Request;
|
||||
use Espo\Core\Controllers\Record;
|
||||
use Espo\Core\Mail\Exceptions\SendingError;
|
||||
use Espo\Tools\UserSecurity\ApiService;
|
||||
use Espo\Tools\UserSecurity\Password\RecoveryService;
|
||||
use Espo\Core\Select\SearchParams;
|
||||
use Espo\Core\Select\Where\Item as WhereItem;
|
||||
@@ -163,12 +161,12 @@ class User extends Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
return $this->getUserService()
|
||||
->generateNewApiKeyForEntity($data->id)
|
||||
return $this->injectableFactory
|
||||
->create(ApiService::class)
|
||||
->generateNewApiKey($data->id)
|
||||
->getValueMap();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @throws BadRequest
|
||||
* @throws Forbidden
|
||||
@@ -257,10 +255,4 @@ class User extends Record
|
||||
{
|
||||
return $this->injectableFactory->create(PasswordService::class);
|
||||
}
|
||||
|
||||
private function getUserService(): Service
|
||||
{
|
||||
/** @var Service */
|
||||
return $this->getServiceFactory()->create('User');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user