Fix #45 added option to show passwords on emails

This commit is contained in:
Antonio Ramirez
2017-08-06 12:38:58 +02:00
parent 4b96d8057c
commit a54fa82af4
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
# CHANGELOG
## 1.0.10 - Work In Progress
- Enh #45: Added option to display the password to the welcome email (tonydspaniard)
- Fix #44: Check if the password is empty instead for null value (tonydspaniard)
- Fix #43: Added Table options according to driver type (tonydspaniard)
- Fix #42: Allow setting permissions as children to roles (kurounin)

View File

@ -21,10 +21,11 @@ class MailFactory
{
/**
* @param User $user
* @param bool $showPassword
*
* @return MailService
*/
public static function makeWelcomeMailerService(User $user)
public static function makeWelcomeMailerService(User $user, $showPassword = false)
{
/** @var Module $module */
$module = Yii::$app->getModule('user');
@ -35,7 +36,7 @@ class MailFactory
'user' => $user,
'token' => null,
'module' => $module,
'showPassword' => false,
'showPassword' => $showPassword,
];
return static::makeMailerService($from, $to, $subject, 'welcome', $params);