From 7d6f04c1047977d854ab173fa418795b60c56913 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 10 Dec 2017 19:18:27 +0100 Subject: [PATCH] Added a comment to make the example easier to understand --- controller/csrf_token_validation.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controller/csrf_token_validation.rst b/controller/csrf_token_validation.rst index 5bf60980925..25555d78cfb 100644 --- a/controller/csrf_token_validation.rst +++ b/controller/csrf_token_validation.rst @@ -11,6 +11,8 @@ method to check the validity of a CSRF token:: public function deleteAction() { + // get the value of the $submittedToken from the request... + if ($this->isCsrfTokenValid('token_id', $submittedToken)) { // ... do something, like deleting an object }