@@ -25,7 +25,9 @@ trait VerifiesUsers
2525 */
2626 public function getVerification (Request $ request , $ token )
2727 {
28- $ this ->validateRequest ($ request );
28+ if (! $ this ->validateRequest ($ request )) {
29+ return redirect ($ this ->redirectIfVerificationFails ());
30+ }
2931
3032 try {
3133 UserVerificationFacade::process ($ request ->input ('email ' ), $ token , $ this ->userTable ());
@@ -54,7 +56,7 @@ public function getVerificationError()
5456 * Validate the verification link.
5557 *
5658 * @param string $token
57- * @return Response
59+ * @return bool
5860 */
5961 protected function validateRequest (Request $ request )
6062 {
@@ -63,7 +65,7 @@ protected function validateRequest(Request $request)
6365 ]);
6466
6567 if ($ validator ->fails ()) {
66- return redirect ( $ this -> redirectIfVerificationFails ()) ;
68+ return false ;
6769 }
6870 }
6971
@@ -74,7 +76,9 @@ protected function validateRequest(Request $request)
7476 */
7577 protected function verificationErrorView ()
7678 {
77- return property_exists ($ this , 'verificationErrorView ' ) ? $ this ->verificationErrorView : 'laravel-user-verification::user-verification ' ;
79+ return property_exists ($ this , 'verificationErrorView ' )
80+ ? $ this ->verificationErrorView
81+ : 'laravel-user-verification::user-verification ' ;
7882 }
7983
8084 /**
@@ -84,7 +88,9 @@ protected function verificationErrorView()
8488 */
8589 protected function verificationEmailView ()
8690 {
87- return property_exists ($ this , 'verificationEmailView ' ) ? $ this ->verificationEmailView : 'emails.user-verification ' ;
91+ return property_exists ($ this , 'verificationEmailView ' )
92+ ? $ this ->verificationEmailView
93+ : 'emails.user-verification ' ;
8894 }
8995
9096 /**
0 commit comments