@@ -99,7 +99,7 @@ abstract class AbstractUser implements SymfonyUserInterface, PasswordAuthenticat
9999 protected ?\DateTime $ newEmailAddressChangeRequestedAt = null ;
100100
101101 #[ApiProperty(readable: false , writable: false )]
102- public ?string $ plainNewEmailConfirmationToken = null ;
102+ private ?string $ plainNewEmailConfirmationToken = null ;
103103
104104 #[ApiProperty(readable: true , writable: false )]
105105 #[Groups(['User:output ' , 'Form:cwa_resource:read ' ])]
@@ -112,7 +112,7 @@ abstract class AbstractUser implements SymfonyUserInterface, PasswordAuthenticat
112112 protected ?string $ emailAddressVerifyToken = null ;
113113
114114 #[ApiProperty(readable: false , writable: false )]
115- public ?string $ plainEmailAddressVerifyToken = null ;
115+ private ?string $ plainEmailAddressVerifyToken = null ;
116116
117117 #[ApiProperty(readable: false , writable: false )]
118118 protected ?\DateTime $ emailLastUpdatedAt = null ;
@@ -253,9 +253,6 @@ public function getNewEmailAddress(): ?string
253253 public function setNewEmailAddress (?string $ newEmailAddress ): self
254254 {
255255 $ this ->newEmailAddress = $ newEmailAddress ;
256- if ($ newEmailAddress ) {
257- $ this ->newEmailAddressChangeRequestedAt = new \DateTime ();
258- }
259256
260257 return $ this ;
261258 }
@@ -268,9 +265,6 @@ public function getNewEmailConfirmationToken(): ?string
268265 public function setNewEmailConfirmationToken (?string $ newEmailConfirmationToken ): self
269266 {
270267 $ this ->newEmailConfirmationToken = $ newEmailConfirmationToken ;
271- if ($ newEmailConfirmationToken ) {
272- $ this ->newEmailAddressChangeRequestedAt = new \DateTime ();
273- }
274268
275269 return $ this ;
276270 }
@@ -300,9 +294,6 @@ public function getEmailAddressVerifyToken(): ?string
300294 public function setEmailAddressVerifyToken (?string $ emailAddressVerifyToken ): void
301295 {
302296 $ this ->emailAddressVerifyToken = $ emailAddressVerifyToken ;
303- if ($ emailAddressVerifyToken ) {
304- $ this ->emailLastUpdatedAt = new \DateTime ();
305- }
306297 }
307298
308299 public function isPasswordRequestLimitReached ($ ttl ): bool
@@ -408,4 +399,30 @@ public function getUserIdentifier(): string
408399 {
409400 return $ this ->getUsername ();
410401 }
402+
403+ public function getPlainNewEmailConfirmationToken (): ?string
404+ {
405+ return $ this ->plainNewEmailConfirmationToken ;
406+ }
407+
408+ public function setPlainNewEmailConfirmationToken (?string $ plainNewEmailConfirmationToken ): void
409+ {
410+ $ this ->plainNewEmailConfirmationToken = $ plainNewEmailConfirmationToken ;
411+ if ($ plainNewEmailConfirmationToken ) {
412+ $ this ->newEmailAddressChangeRequestedAt = new \DateTime ();
413+ }
414+ }
415+
416+ public function getPlainEmailAddressVerifyToken (): ?string
417+ {
418+ return $ this ->plainEmailAddressVerifyToken ;
419+ }
420+
421+ public function setPlainEmailAddressVerifyToken (?string $ plainEmailAddressVerifyToken ): void
422+ {
423+ $ this ->plainEmailAddressVerifyToken = $ plainEmailAddressVerifyToken ;
424+ if ($ plainEmailAddressVerifyToken ) {
425+ $ this ->emailLastUpdatedAt = new \DateTime ();
426+ }
427+ }
411428}
0 commit comments