aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2017-07-03 13:39:54 +0200
committerGitHub <noreply@github.com>2017-07-03 13:39:54 +0200
commit71e1cbc8eb5928d393b0772055d6b711e90a09b3 (patch)
tree71795eadcf13fda9198b8cd9a3da26d51826bbd9 /src/Wallabag/ApiBundle/Controller/WallabagRestController.php
parent822c877949aff8ae57677671115f8f4fc69588d5 (diff)
parent38520658addc217f127b0627ea28dcf8d6e6178c (diff)
downloadwallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.tar.gz
wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.tar.zst
wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.zip
Merge pull request #3258 from wallabag/cs-fixer
Add a real configuration for CS-Fixer
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller/WallabagRestController.php')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index b1e08ca4..71da2a64 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -40,8 +40,8 @@ class WallabagRestController extends FOSRestController
40 protected function validateUserAccess($requestUserId) 40 protected function validateUserAccess($requestUserId)
41 { 41 {
42 $user = $this->get('security.token_storage')->getToken()->getUser(); 42 $user = $this->get('security.token_storage')->getToken()->getUser();
43 if ($requestUserId != $user->getId()) { 43 if ($requestUserId !== $user->getId()) {
44 throw $this->createAccessDeniedException('Access forbidden. Entry user id: '.$requestUserId.', logged user id: '.$user->getId()); 44 throw $this->createAccessDeniedException('Access forbidden. Entry user id: ' . $requestUserId . ', logged user id: ' . $user->getId());
45 } 45 }
46 } 46 }
47} 47}