Fixed bad message when setting e-mail to empty
This commit is contained in:
parent
6a721a0f90
commit
aee6ed7dbf
1 changed files with 1 additions and 6 deletions
|
@ -28,12 +28,7 @@ class EmailService
|
||||||
public function sendActivationEmail(\Szurubooru\Entities\User $user, \Szurubooru\Entities\Token $token)
|
public function sendActivationEmail(\Szurubooru\Entities\User $user, \Szurubooru\Entities\Token $token)
|
||||||
{
|
{
|
||||||
if (!$user->getEmailUnconfirmed())
|
if (!$user->getEmailUnconfirmed())
|
||||||
{
|
throw new \BadMethodCallException('An e-mail address is needed to activate the account.');
|
||||||
throw new \BadMethodCallException(
|
|
||||||
$user->getEmail()
|
|
||||||
? 'E-mail for this account is already confirmed.'
|
|
||||||
: 'An e-mail address is needed to activate the account.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$mailSubject = $this->tokenize($this->config->mail->activationSubject);
|
$mailSubject = $this->tokenize($this->config->mail->activationSubject);
|
||||||
$mailBody = $this->tokenizeFile(
|
$mailBody = $this->tokenizeFile(
|
||||||
|
|
Loading…
Reference in a new issue