phone/email: set primary on save
This commit is contained in:
@@ -346,6 +346,8 @@ class Saver implements SaverInterface
|
||||
if ($primary) {
|
||||
$emailAddress = $this->getByAddress($primary);
|
||||
|
||||
$entity->set(self::ATTR_EMAIL_ADDRESS, $primary);
|
||||
|
||||
if ($emailAddress) {
|
||||
$update1 = $this->entityManager
|
||||
->getQueryBuilder()
|
||||
|
||||
@@ -352,6 +352,8 @@ class Saver implements SaverInterface
|
||||
if ($primary) {
|
||||
$phoneNumber = $this->getByNumber($primary);
|
||||
|
||||
$entity->set(self::ATTR_PHONE_NUMBER, $primary);
|
||||
|
||||
if ($phoneNumber) {
|
||||
$update1 = $this->entityManager
|
||||
->getQueryBuilder()
|
||||
|
||||
Reference in New Issue
Block a user