@@ 70-85 (lines=16) @@ | ||
67 | $this->identityRepository = $identityRepository; |
|
68 | } |
|
69 | ||
70 | public function applyIdentityRenamedEvent(IdentityRenamedEvent $event) |
|
71 | { |
|
72 | $secondFactors = $this->raSecondFactorRepository->findByIdentityId((string) $event->identityId); |
|
73 | ||
74 | if (count($secondFactors) === 0) { |
|
75 | return; |
|
76 | } |
|
77 | ||
78 | $commonName = $event->commonName; |
|
79 | ||
80 | foreach ($secondFactors as $secondFactor) { |
|
81 | $secondFactor->name = $commonName; |
|
82 | } |
|
83 | ||
84 | $this->raSecondFactorRepository->saveAll($secondFactors); |
|
85 | } |
|
86 | ||
87 | public function applyIdentityEmailChangedEvent(IdentityEmailChangedEvent $event) |
|
88 | { |
|
@@ 87-102 (lines=16) @@ | ||
84 | $this->raSecondFactorRepository->saveAll($secondFactors); |
|
85 | } |
|
86 | ||
87 | public function applyIdentityEmailChangedEvent(IdentityEmailChangedEvent $event) |
|
88 | { |
|
89 | $secondFactors = $this->raSecondFactorRepository->findByIdentityId((string) $event->identityId); |
|
90 | ||
91 | if (count($secondFactors) === 0) { |
|
92 | return; |
|
93 | } |
|
94 | ||
95 | $email = $event->email; |
|
96 | ||
97 | foreach ($secondFactors as $secondFactor) { |
|
98 | $secondFactor->email = $email; |
|
99 | } |
|
100 | ||
101 | $this->raSecondFactorRepository->saveAll($secondFactors); |
|
102 | } |
|
103 | ||
104 | public function applyYubikeySecondFactorBootstrappedEvent(YubikeySecondFactorBootstrappedEvent $event) |
|
105 | { |