Skip to content

Commit

Permalink
Merge pull request #497 from eluhr/feature/fix-password-recovery-url
Browse files Browse the repository at this point in the history
Fixed password recovery link in welcome mail
  • Loading branch information
maxxer committed Jan 9, 2023
2 parents e370af6 + 8a9adf3 commit 7c61372
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## dev

- Fix: use correct password recovery url in welcome mail and add functionality to plain text version of the mail (@eluhr)

## 1.6.0 January 9, 2023

**WARNING**: this release (long time due) makes a step forward in PHP
Expand Down
7 changes: 7 additions & 0 deletions src/User/resources/views/mail/text/welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
* @var \Da\User\Module $module
* @var bool $showPassword
*/

use yii\helpers\Url;

?>
<?= Yii::t('usuario', 'Hello') ?>,

Expand All @@ -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') ?>.
Expand Down
2 changes: 1 addition & 1 deletion src/User/resources/views/mail/welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<?= 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>
Expand Down

0 comments on commit 7c61372

Please sign in to comment.