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