Fixed password recovery link in welcome mail

And add this new feature to the plain text variant too
This commit is contained in:
Elias Luhr
2023-01-09 15:43:52 +01:00
parent 9c84f12c11
commit 20c2b6b3e5
2 changed files with 8 additions and 1 deletions

View File

@ -15,6 +15,9 @@
* @var \Da\User\Module $module
* @var bool $showPassword
*/
use yii\helpers\Url;
?>
<?= Yii::t('usuario', 'Hello') ?>,
@ -23,6 +26,10 @@
<?= Yii::t('usuario', 'We have generated a password for you') ?>:
<?= $user->password ?>
<?php endif ?>
<?php if ($module->allowPasswordRecovery): ?>
<?= Yii::t('usuario', 'If you haven\'t received a password, you can reset it at') ?>:
<?= Url::to(['/user/recovery/request'], true) ?>
<?php endif ?>
<?php if ($token !== null): ?>
<?= Yii::t('usuario', 'In order to complete your registration, please click the link below') ?>.

View File

@ -30,7 +30,7 @@ use yii\helpers\Url;
<?= Yii::t('usuario', 'We have generated a password for you') ?>: <strong><?= $user->password ?></strong>
<?php endif ?>
<?php if ($module->allowPasswordRecovery): ?>
<?= Yii::t('usuario', 'If you haven\'t received a password, you can reset it at') ?>: <strong><?= Html::a(Html::encode(Url::to(['/user/forgot'], true)), Url::to(['/user/forgot'], true)) ?></strong>
<?= Yii::t('usuario', 'If you haven\'t received a password, you can reset it at') ?>: <strong><?= Html::a(Html::encode(Url::to(['/user/recovery/request'], true)), Url::to(['/user/recovery/request'], true)) ?></strong>
<?php endif ?>
</p>