diff --git a/CHANGELOG.md b/CHANGELOG.md index 50e362d..7c819f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/User/Factory/MailFactory.php b/src/User/Factory/MailFactory.php index 6f16a37..2fef8b7 100644 --- a/src/User/Factory/MailFactory.php +++ b/src/User/Factory/MailFactory.php @@ -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);