]> Raphaël G. Git Repositories - userbundle/commitdiff
Add confirm and edit route
authorRaphaël Gertz <git@rapsys.eu>
Sun, 8 Aug 2021 13:07:31 +0000 (15:07 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Sun, 8 Aug 2021 13:07:31 +0000 (15:07 +0200)
Improve recover and register route
Resort routes
Cleanup

Resources/config/routes/rapsys_user.yaml

index c68813723767286d0eeb0ccd63ca5a8cd3dfbc5d..3fbe262df21dd523e73b9f8990db818c9c5408c5 100644 (file)
@@ -1,29 +1,50 @@
+rapsys_user_confirm:
+    path: /confirm/{mail}/{hash}
+    controller: Rapsys\UserBundle\Controller\DefaultController::registerMail
+    requirements:
+        mail: '[a-zA-Z0-9=_-]+'
+        hash: '[a-zA-Z0-9=_-]+'
+    methods: GET|POST
+
 rapsys_user_login:
     path: /login
     controller: Rapsys\UserBundle\Controller\DefaultController::login
     methods: GET|POST
 
+rapsys_user_logout:
+    path: /logout
+    methods: GET
+
 rapsys_user_recover:
-    path: /recover
+    path: /recover/{mail}/pass/{hash}
     controller: Rapsys\UserBundle\Controller\DefaultController::recover
-    methods: GET|POST
-
-rapsys_user_recover_mail:
-    path: /recover/{recipient}/{hash}
-    controller: Rapsys\UserBundle\Controller\DefaultController::recoverMail
+    defaults:
+        mail: ~
+        pass: ~
+        hash: ~
     requirements:
-        recipient: '[a-zA-Z0-9=_-]+'
+        mail: '[a-zA-Z0-9=_-]+'
+        pass: '[a-zA-Z0-9=_-]+'
         hash: '[a-zA-Z0-9=_-]+'
     methods: GET|POST
 
 rapsys_user_register:
-    path: /register
+    path: /register/{fields}/{hash}
     controller: Rapsys\UserBundle\Controller\DefaultController::register
+    defaults:
+        fields: ~
+        hash: ~
+    requirements:
+        fields: '[a-zA-Z0-9=_-]+'
+        hash: '[a-zA-Z0-9=_-]+'
     methods: GET|POST
 
-rapsys_user_logout:
-    path: /logout
-    methods: GET
+rapsys_user_edit:
+    path: /user/{mail}
+    controller: Rapsys\UserBundle\Controller\DefaultController::edit
+    requirements:
+        mail: '[a-zA-Z0-9=_-]+'
+    methods: GET|POST
 
 rapsys_user_index:
     path: /