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