Merge pull request #223 from borisaeric/fix-email-change-service
fix unpassable condition in EmailChangeService
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 1.5.0 - Work in progress
|
||||
- Fix: Fix condition in EmailChangeService (it was always false) (borisaeric)
|
||||
- Fix #198: Updated translations by quique, bizley, TonisOrmisson, guogan, Dezinger, maxxer, wautvda, mrbig00
|
||||
- Fix #209: Doc fix. allowAccountDelete default value is false (Dezinger)
|
||||
- Fix #211: Migration boolean default value set to FALSE instead 0 (Dezinger)
|
||||
|
||||
@ -65,7 +65,7 @@ class User extends ActiveRecord implements IdentityInterface
|
||||
use ContainerAwareTrait;
|
||||
|
||||
// following constants are used on secured email changing process
|
||||
const OLD_EMAIL_CONFIRMED = 0b1;
|
||||
const OLD_EMAIL_CONFIRMED = 0b01;
|
||||
const NEW_EMAIL_CONFIRMED = 0b10;
|
||||
|
||||
/**
|
||||
|
||||
@ -76,7 +76,7 @@ class EmailChangeService implements ServiceInterface
|
||||
);
|
||||
}
|
||||
}
|
||||
if (($this->model->flags & User::NEW_EMAIL_CONFIRMED & $this->model->flags & User::OLD_EMAIL_CONFIRMED)
|
||||
if ((($this->model->flags & User::NEW_EMAIL_CONFIRMED) && ($this->model->flags & User::OLD_EMAIL_CONFIRMED))
|
||||
|| $this->getModule()->emailChangeStrategy === MailChangeStrategyInterface::TYPE_DEFAULT
|
||||
) {
|
||||
$this->model->email = $this->model->unconfirmed_email;
|
||||
|
||||
Reference in New Issue
Block a user