@@ -25,6 +25,7 @@ logic will be performed if you don't assign an array to result, but if
2525you set it we will use as redirect url.
2626
2727- Create or update file src/Event/UsersListener.php:
28+
2829``` php
2930<?php
3031
@@ -41,7 +42,7 @@ class UsersListener implements EventListenerInterface
4142 public function implementedEvents(): array
4243 {
4344 return [
44- \CakeDC\Users\Plugin ::EVENT_BEFORE_LOGOUT => 'beforeLogout',
45+ \CakeDC\Users\UsersPlugin ::EVENT_BEFORE_LOGOUT => 'beforeLogout',
4546 ];
4647 }
4748
@@ -75,6 +76,7 @@ object and the controller object.
7576You can also populate the new user entity or stop the register process.
7677
7778- Create or update file src/Event/UsersListener.php:
79+
7880``` php
7981<?php
8082
@@ -90,7 +92,7 @@ class UsersListener implements EventListenerInterface
9092 public function implementedEvents(): array
9193 {
9294 return [
93- \CakeDC\Users\Plugin ::EVENT_BEFORE_REGISTER => 'beforeRegister',
95+ \CakeDC\Users\UsersPlugin ::EVENT_BEFORE_REGISTER => 'beforeRegister',
9496 ];
9597 }
9698
@@ -136,6 +138,7 @@ have access to 'location' and 'request' keys in the event object and
136138the controller object.
137139
138140- Create or update file src/Event/UsersListener.php:
141+
139142``` php
140143<?php
141144
@@ -151,7 +154,7 @@ class UsersListener implements EventListenerInterface
151154 public function implementedEvents(): array
152155 {
153156 return [
154- \CakeDC\Users\Plugin ::EVENT_BEFORE_SOCIAL_LOGIN_REDIRECT => 'beforeSocialLoginRedirect',
157+ \CakeDC\Users\UsersPlugin ::EVENT_BEFORE_SOCIAL_LOGIN_REDIRECT => 'beforeSocialLoginRedirect',
155158 ];
156159 }
157160
@@ -183,6 +186,7 @@ the social behavior object.
183186You can also set a new user entity object as result.
184187
185188- Create or update file src/Event/UsersListener.php:
189+
186190``` php
187191<?php
188192
@@ -198,7 +202,7 @@ class UsersListener implements EventListenerInterface
198202 public function implementedEvents(): array
199203 {
200204 return [
201- \CakeDC\Users\Plugin ::EVENT_BEFORE_SOCIAL_LOGIN_REDIRECT => 'beforeSocialLoginRedirect',
205+ \CakeDC\Users\UsersPlugin ::EVENT_BEFORE_SOCIAL_LOGIN_REDIRECT => 'beforeSocialLoginRedirect',
202206 ];
203207 }
204208
@@ -229,6 +233,7 @@ have access to user data. You can also set an array as result to
229233perform a custom redirect.
230234
231235- Create or update file src/Event/UsersListener.php:
236+
232237``` php
233238<?php
234239
@@ -247,7 +252,7 @@ class UsersListener implements EventListenerInterface
247252 public function implementedEvents(): array
248253 {
249254 return [
250- \CakeDC\Users\Plugin ::EVENT_AFTER_LOGIN => 'afterLogin',
255+ \CakeDC\Users\UsersPlugin ::EVENT_AFTER_LOGIN => 'afterLogin',
251256 ];
252257 }
253258
@@ -281,6 +286,7 @@ have access to user data and the controller object. You can also
281286set an array as result to perform a custom redirect.
282287
283288- Create or update file src/Event/UsersListener.php:
289+
284290``` php
285291<?php
286292
@@ -296,7 +302,7 @@ class UsersListener implements EventListenerInterface
296302 public function implementedEvents(): array
297303 {
298304 return [
299- \CakeDC\Users\Plugin ::EVENT_AFTER_LOGOUT => 'afterLogout',
305+ \CakeDC\Users\UsersPlugin ::EVENT_AFTER_LOGOUT => 'afterLogout',
300306 ];
301307 }
302308
@@ -332,6 +338,7 @@ set a custom http response as result to render a different content
332338or perform a custom redirect.
333339
334340- Create or update file src/Event/UsersListener.php:
341+
335342``` php
336343<?php
337344
@@ -347,7 +354,7 @@ class UsersListener implements EventListenerInterface
347354 public function implementedEvents(): array
348355 {
349356 return [
350- \CakeDC\Users\Plugin ::EVENT_AFTER_REGISTER => 'afterRegister',
357+ \CakeDC\Users\UsersPlugin ::EVENT_AFTER_REGISTER => 'afterRegister',
351358 ];
352359 }
353360
@@ -383,6 +390,7 @@ you have access to some user data and the controller object. You can also
383390set an array as result to perform a custom redirect.
384391
385392- Create or update file src/Event/UsersListener.php:
393+
386394``` php
387395<?php
388396
@@ -398,7 +406,7 @@ class UsersListener implements EventListenerInterface
398406 public function implementedEvents(): array
399407 {
400408 return [
401- \CakeDC\Users\Plugin ::EVENT_AFTER_CHANGE_PASSWORD => 'afterChangePassword',
409+ \CakeDC\Users\UsersPlugin ::EVENT_AFTER_CHANGE_PASSWORD => 'afterChangePassword',
402410 ];
403411 }
404412
@@ -433,6 +441,7 @@ When adding a custom logic to execute after sending the token for user
433441validation you can also set an array as result to perform a custom redirect.
434442
435443- Create or update file src/Event/UsersListener.php:
444+
436445``` php
437446<?php
438447
@@ -448,7 +457,7 @@ class UsersListener implements EventListenerInterface
448457 public function implementedEvents(): array
449458 {
450459 return [
451- \CakeDC\Users\Plugin ::EVENT_AFTER_RESEND_TOKEN_VALIDATION => 'afterResendTokenValidation',
460+ \CakeDC\Users\UsersPlugin ::EVENT_AFTER_RESEND_TOKEN_VALIDATION => 'afterResendTokenValidation',
452461 ];
453462 }
454463
@@ -482,6 +491,7 @@ you have access to some user data and the controller object. You can also
482491set an array as result to perform a custom redirect.
483492
484493- Create or update file src/Event/UsersListener.php:
494+
485495``` php
486496<?php
487497
@@ -497,7 +507,7 @@ class UsersListener implements EventListenerInterface
497507 public function implementedEvents(): array
498508 {
499509 return [
500- \CakeDC\Users\Plugin ::EVENT_AFTER_EMAIL_TOKEN_VALIDATION => 'afterEmailTokenValidation',
510+ \CakeDC\Users\UsersPlugin ::EVENT_AFTER_EMAIL_TOKEN_VALIDATION => 'afterEmailTokenValidation',
501511 ];
502512 }
503513
@@ -530,6 +540,7 @@ I want to add custom logic after user email is validated to autologin user
530540This is how you can autologin the user after email is validate:
531541
532542- Create or update file src/Event/UsersListener.php:
543+
533544``` php
534545<?php
535546
@@ -545,7 +556,7 @@ class UsersListener implements EventListenerInterface
545556 public function implementedEvents(): array
546557 {
547558 return [
548- \CakeDC\Users\Plugin ::EVENT_AFTER_EMAIL_TOKEN_VALIDATION => 'afterEmailTokenValidation',
559+ \CakeDC\Users\UsersPlugin ::EVENT_AFTER_EMAIL_TOKEN_VALIDATION => 'afterEmailTokenValidation',
549560 ];
550561 }
551562
0 commit comments