diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c5bacbf..c2c555b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [5.1.0] - 2019-05-29 +### Added +- Use `supportName` and `supportEmail` if `helpCenterUrl` is not provided +- Allow multi-line email signature + ## [5.0.0] - 2019-05-10 ### Added - Use memcache for session storage @@ -96,7 +101,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Initial version of Password Manager Backend. -[Unreleased]: https://github.com/silinternational/idp-pw-api/compare/5.0.0...HEAD +[Unreleased]: https://github.com/silinternational/idp-pw-api/compare/5.1.0...HEAD +[5.1.0]: https://github.com/silinternational/idp-pw-api/compare/5.0.0...5.1.0 [5.0.0]: https://github.com/silinternational/idp-pw-api/compare/4.1.0...5.0.0 [4.1.0]: https://github.com/silinternational/idp-pw-api/compare/4.0.0...4.1.0 [4.0.0]: https://github.com/silinternational/idp-pw-api/compare/3.0.0...4.0.0 diff --git a/application/common/config/main.php b/application/common/config/main.php index 49b0964d..82c072b1 100644 --- a/application/common/config/main.php +++ b/application/common/config/main.php @@ -27,8 +27,9 @@ $uiCorsOrigin = Env::get('UI_CORS_ORIGIN', $uiUrl); $helpCenterUrl = Env::get('HELP_CENTER_URL'); $codeLength = Env::get('CODE_LENGTH', 6); -$supportPhone = Env::get('SUPPORT_PHONE'); $supportEmail = Env::get('SUPPORT_EMAIL'); +$supportName = Env::get('SUPPORT_NAME', 'support'); +$supportPhone = Env::get('SUPPORT_PHONE'); $supportUrl = Env::get('SUPPORT_URL'); $supportFeedback = Env::get('SUPPORT_FEEDBACK'); $accessTokenHashKey = Env::get('ACCESS_TOKEN_HASH_KEY'); @@ -201,6 +202,7 @@ 'secretKey' => $recaptchaSecretKey, ], 'support' => [ + 'name' => $supportName, 'phone' => $supportPhone, 'email' => $supportEmail, 'url' => $supportUrl, diff --git a/application/common/mail/reset/on-behalf.php b/application/common/mail/reset/on-behalf.php index 5e3b1e35..5f2bd277 100644 --- a/application/common/mail/reset/on-behalf.php +++ b/application/common/mail/reset/on-behalf.php @@ -9,6 +9,8 @@ * @var string $helpCenterUrl * @var string $emailSignature * @var string $displayName + * @var string $supportName + * @var string $supportEmail */ ?>

@@ -27,11 +29,17 @@

To maintain security, please don't forward this email to anyone. - See our Help Center at for more security tips. + + If you have any questions, please contact at + . + + See our Help Center at for more security + tips. +

Thanks,

- +

diff --git a/application/common/mail/reset/self.php b/application/common/mail/reset/self.php index f750c6fc..5740469d 100644 --- a/application/common/mail/reset/self.php +++ b/application/common/mail/reset/self.php @@ -8,6 +8,8 @@ * @var string $helpCenterUrl * @var string $displayName * @var string $emailSignature + * @var string $supportName + * @var string $supportEmail */ ?>

@@ -27,11 +29,17 @@

To keep your account secure, please don't forward this email to anyone. - See our Help Center at for more security tips. + + If you have any questions, please contact at + . + + See our Help Center at for more security + tips. +

Thanks,

- +

diff --git a/application/common/models/Verification.php b/application/common/models/Verification.php index 0a991ef8..bddc4af3 100644 --- a/application/common/models/Verification.php +++ b/application/common/models/Verification.php @@ -49,6 +49,8 @@ public static function sendEmail( 'expireTime' => $expireTime, 'toAddress' => $toAddress, 'helpCenterUrl' => \Yii::$app->params['helpCenterUrl'], + 'supportName' => \Yii::$app->params['support']['name'], + 'supportEmail' => \Yii::$app->params['support']['email'], 'emailSignature' => \Yii::$app->params['emailSignature'], ], $additionalEmailParameters diff --git a/application/tests/unit/common/components/IdBrokerTest.php b/application/tests/unit/common/components/IdBrokerTest.php index 9c2f2b50..dcd2a35f 100644 --- a/application/tests/unit/common/components/IdBrokerTest.php +++ b/application/tests/unit/common/components/IdBrokerTest.php @@ -165,7 +165,7 @@ public function getMockComponent($mockedMethod = null, $returnValue = null) ->setMethods(['callIdBrokerGetUser', 'listUsers']) ->getMock(); - if ($mockedMethod) { + if (is_string($mockedMethod)) { $brokerMock->expects($this->any()) ->method($mockedMethod) ->willReturn($returnValue); diff --git a/local.env.dist b/local.env.dist index a2f705ad..3e754a73 100644 --- a/local.env.dist +++ b/local.env.dist @@ -36,9 +36,10 @@ UI_CORS_ORIGIN= # === frontend config data === -# Optional support contact information. +# Optional support contact information. SUPPORT_EMAIL must be provided if HELP_CENTER_URL is not #SUPPORT_PHONE= #SUPPORT_EMAIL= +#SUPPORT_NAME=support #SUPPORT_URL= #SUPPORT_FEEDBACK=