diff --git a/best_practices/security.rst b/best_practices/security.rst index cf53ee2d405..a78f8327196 100644 --- a/best_practices/security.rst +++ b/best_practices/security.rst @@ -181,7 +181,7 @@ to the ``Post`` entity that checks if a given user is its author:: */ public function isAuthor(User $user = null) { - return $user && $user->getEmail() == $this->getAuthorEmail(); + return $user && $user->getEmail() === $this->getAuthorEmail(); } }