mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-06 16:36:59 +01:00
* Closes #26. Send email to the user when he was requested (forced) for a password reset.
This commit is contained in:
@@ -184,8 +184,8 @@ class SP_Auth
|
||||
) {
|
||||
$hash = SP_Util::generate_random_bytes();
|
||||
|
||||
$message['action'] = _('Recuperación de Clave');
|
||||
$message['text'][] = SP_Html::strongText(_('Se ha solicitado la recuperación de su clave de usuario.'));
|
||||
$message['action'] = _('Cambio de Clave');
|
||||
$message['text'][] = SP_Html::strongText(_('Se ha solicitado el cambio de su clave de usuario.'));
|
||||
$message['text'][] = '';
|
||||
$message['text'][] = _('Para completar el proceso es necesario que acceda a la siguiente URL:');
|
||||
$message['text'][] = '';
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -785,6 +785,12 @@ class SP_Users
|
||||
$message['action'] = _('Nuevo Usuario');
|
||||
$message['text'][] = SP_Html::strongText(_('Usuario') . ': ') . $this->userName . ' (' . $this->userLogin . ')';
|
||||
|
||||
if ($this->userChangePass){
|
||||
if ( ! SP_Auth::mailPassRecover(DB::escape($this->userLogin),DB::escape($this->userEmail)) ){
|
||||
$message['text'][] = SP_Html::strongText(_('No se pudo realizar la petición de cambio de clave.'));
|
||||
}
|
||||
}
|
||||
|
||||
SP_Log::wrLogInfo($message);
|
||||
SP_Common::sendEmail($message);
|
||||
|
||||
@@ -820,6 +826,12 @@ class SP_Users
|
||||
$message['action'] = _('Modificar Usuario');
|
||||
$message['text'][] = SP_Html::strongText(_('Usuario') . ': ') . $this->userName . ' (' . $this->userLogin . ')';
|
||||
|
||||
if ($this->userChangePass){
|
||||
if ( ! SP_Auth::mailPassRecover(DB::escape($this->userLogin),DB::escape($this->userEmail)) ){
|
||||
$message['text'][] = SP_Html::strongText(_('No se pudo realizar la petición de cambio de clave.'));
|
||||
}
|
||||
}
|
||||
|
||||
SP_Log::wrLogInfo($message);
|
||||
SP_Common::sendEmail($message);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user