diff --git a/core/modules/rest/src/Plugin/rest/resource/UserLoginResource.php b/core/modules/rest/src/Plugin/rest/resource/UserLoginResource.php index 68ee9f7..4e1e255 100644 --- a/core/modules/rest/src/Plugin/rest/resource/UserLoginResource.php +++ b/core/modules/rest/src/Plugin/rest/resource/UserLoginResource.php @@ -287,10 +287,8 @@ protected function requestNewPassword(array $reset_info) { protected function restFloodControl($config, $name) { $limit = $config->get('user_limit'); $interval = $config->get('user_window'); - if ($this->flood->isAllowed($name, $limit, $interval)) { - return TRUE; - } - return FALSE; + + return $this->flood->isAllowed($name, $limit, $interval); } }