mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
generate and send password
This commit is contained in:
@@ -118,6 +118,14 @@ class User extends \Espo\Core\Controllers\Record
|
||||
return $this->getRecordService()->generateNewApiKeyForEntity($data->id)->getValueMap();
|
||||
}
|
||||
|
||||
public function postActionGenerateNewPassword($params, $data, $request)
|
||||
{
|
||||
if (empty($data->id)) throw new BadRequest();
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
$this->getRecordService()->generateNewPasswordForUser($data->id);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function beforeCreateLink()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) throw new Forbidden();
|
||||
|
||||
Reference in New Issue
Block a user