{"action":"closed","number":218,"pull_request":{"url":"https://api.github.com/repos/dektrium/yii2-user/pulls/218","id":26776977,"html_url":"https://github.com/dektrium/yii2-user/pull/218","diff_url":"https://github.com/dektrium/yii2-user/pull/218.diff","patch_url":"https://github.com/dektrium/yii2-user/pull/218.patch","issue_url":"https://api.github.com/repos/dektrium/yii2-user/issues/218","number":218,"state":"closed","locked":false,"title":"Avoid a flood of request on login form","user":{"login":"thiagotalma","id":612578,"avatar_url":"https://avatars.githubusercontent.com/u/612578?v=3","gravatar_id":"","url":"https://api.github.com/users/thiagotalma","html_url":"https://github.com/thiagotalma","followers_url":"https://api.github.com/users/thiagotalma/followers","following_url":"https://api.github.com/users/thiagotalma/following{/other_user}","gists_url":"https://api.github.com/users/thiagotalma/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagotalma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagotalma/subscriptions","organizations_url":"https://api.github.com/users/thiagotalma/orgs","repos_url":"https://api.github.com/users/thiagotalma/repos","events_url":"https://api.github.com/users/thiagotalma/events{/privacy}","received_events_url":"https://api.github.com/users/thiagotalma/received_events","type":"User","site_admin":false},"body":"Without these properties, in every keystroke typed on the username and password an ajax request is made trying to login. Lika a brute force attack.\r\n\r\nI would also like to discuss with you a change in Ajax validation. It would be more performatic if the user is already redirected when no error occurs in the validation.\r\n\r\nI'm doing this by extending the class and overriding the method:\r\n\r\n```PHP\r\n    protected function performAjaxValidation(Model $model)\r\n    {\r\n        if (\\Yii::$app->request->isAjax && $model->load(\\Yii::$app->request->post())) {\r\n            $result = ActiveForm::validate($model);\r\n            \\Yii::$app->response->format = Response::FORMAT_JSON;\r\n            if ($result === []) {\r\n                return $this->goBack();\r\n            }\r\n            echo json_encode($result);\r\n            \\Yii::$app->end();\r\n        }\r\n    }\r\n```","created_at":"2015-01-03T00:45:39Z","updated_at":"2015-01-03T12:15:50Z","closed_at":"2015-01-03T12:15:50Z","merged_at":"2015-01-03T12:15:50Z","merge_commit_sha":"056c3a79244fa40d0a3e1998391cf76c6e9d3491","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dektrium/yii2-user/pulls/218/commits","review_comments_url":"https://api.github.com/repos/dektrium/yii2-user/pulls/218/comments","review_comment_url":"https://api.github.com/repos/dektrium/yii2-user/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dektrium/yii2-user/issues/218/comments","statuses_url":"https://api.github.com/repos/dektrium/yii2-user/statuses/26ce3ae5da0f6e3335c72d2ca23c17a3bac183d8","head":{"label":"thiagotalma:login","ref":"login","sha":"26ce3ae5da0f6e3335c72d2ca23c17a3bac183d8","user":{"login":"thiagotalma","id":612578,"avatar_url":"https://avatars.githubusercontent.com/u/612578?v=3","gravatar_id":"","url":"https://api.github.com/users/thiagotalma","html_url":"https://github.com/thiagotalma","followers_url":"https://api.github.com/users/thiagotalma/followers","following_url":"https://api.github.com/users/thiagotalma/following{/other_user}","gists_url":"https://api.github.com/users/thiagotalma/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagotalma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagotalma/subscriptions","organizations_url":"https://api.github.com/users/thiagotalma/orgs","repos_url":"https://api.github.com/users/thiagotalma/repos","events_url":"https://api.github.com/users/thiagotalma/events{/privacy}","received_events_url":"https://api.github.com/users/thiagotalma/received_events","type":"User","site_admin":false},"repo":{"id":21364450,"name":"yii2-user","full_name":"thiagotalma/yii2-user","owner":{"login":"thiagotalma","id":612578,"avatar_url":"https://avatars.githubusercontent.com/u/612578?v=3","gravatar_id":"","url":"https://api.github.com/users/thiagotalma","html_url":"https://github.com/thiagotalma","followers_url":"https://api.github.com/users/thiagotalma/followers","following_url":"https://api.github.com/users/thiagotalma/following{/other_user}","gists_url":"https://api.github.com/users/thiagotalma/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagotalma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagotalma/subscriptions","organizations_url":"https://api.github.com/users/thiagotalma/orgs","repos_url":"https://api.github.com/users/thiagotalma/repos","events_url":"https://api.github.com/users/thiagotalma/events{/privacy}","received_events_url":"https://api.github.com/users/thiagotalma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thiagotalma/yii2-user","description":"Flexible user registration and authentication module for Yii2","fork":true,"url":"https://api.github.com/repos/thiagotalma/yii2-user","forks_url":"https://api.github.com/repos/thiagotalma/yii2-user/forks","keys_url":"https://api.github.com/repos/thiagotalma/yii2-user/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thiagotalma/yii2-user/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thiagotalma/yii2-user/teams","hooks_url":"https://api.github.com/repos/thiagotalma/yii2-user/hooks","issue_events_url":"https://api.github.com/repos/thiagotalma/yii2-user/issues/events{/number}","events_url":"https://api.github.com/repos/thiagotalma/yii2-user/events","assignees_url":"https://api.github.com/repos/thiagotalma/yii2-user/assignees{/user}","branches_url":"https://api.github.com/repos/thiagotalma/yii2-user/branches{/branch}","tags_url":"https://api.github.com/repos/thiagotalma/yii2-user/tags","blobs_url":"https://api.github.com/repos/thiagotalma/yii2-user/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thiagotalma/yii2-user/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thiagotalma/yii2-user/git/refs{/sha}","trees_url":"https://api.github.com/repos/thiagotalma/yii2-user/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thiagotalma/yii2-user/statuses/{sha}","languages_url":"https://api.github.com/repos/thiagotalma/yii2-user/languages","stargazers_url":"https://api.github.com/repos/thiagotalma/yii2-user/stargazers","contributors_url":"https://api.github.com/repos/thiagotalma/yii2-user/contributors","subscribers_url":"https://api.github.com/repos/thiagotalma/yii2-user/subscribers","subscription_url":"https://api.github.com/repos/thiagotalma/yii2-user/subscription","commits_url":"https://api.github.com/repos/thiagotalma/yii2-user/commits{/sha}","git_commits_url":"https://api.github.com/repos/thiagotalma/yii2-user/git/commits{/sha}","comments_url":"https://api.github.com/repos/thiagotalma/yii2-user/comments{/number}","issue_comment_url":"https://api.github.com/repos/thiagotalma/yii2-user/issues/comments/{number}","contents_url":"https://api.github.com/repos/thiagotalma/yii2-user/contents/{+path}","compare_url":"https://api.github.com/repos/thiagotalma/yii2-user/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thiagotalma/yii2-user/merges","archive_url":"https://api.github.com/repos/thiagotalma/yii2-user/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thiagotalma/yii2-user/downloads","issues_url":"https://api.github.com/repos/thiagotalma/yii2-user/issues{/number}","pulls_url":"https://api.github.com/repos/thiagotalma/yii2-user/pulls{/number}","milestones_url":"https://api.github.com/repos/thiagotalma/yii2-user/milestones{/number}","notifications_url":"https://api.github.com/repos/thiagotalma/yii2-user/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thiagotalma/yii2-user/labels{/name}","releases_url":"https://api.github.com/repos/thiagotalma/yii2-user/releases{/id}","created_at":"2014-06-30T20:10:40Z","updated_at":"2014-07-26T02:38:06Z","pushed_at":"2015-01-02T23:50:50Z","git_url":"git://github.com/thiagotalma/yii2-user.git","ssh_url":"git@github.com:thiagotalma/yii2-user.git","clone_url":"https://github.com/thiagotalma/yii2-user.git","svn_url":"https://github.com/thiagotalma/yii2-user","homepage":"http://yii2-user.dmeroff.ru","size":1003,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dektrium:master","ref":"master","sha":"76875d9be33e15b1e12b94f9c8c137c9a7525d39","user":{"login":"dektrium","id":4910348,"avatar_url":"https://avatars.githubusercontent.com/u/4910348?v=3","gravatar_id":"","url":"https://api.github.com/users/dektrium","html_url":"https://github.com/dektrium","followers_url":"https://api.github.com/users/dektrium/followers","following_url":"https://api.github.com/users/dektrium/following{/other_user}","gists_url":"https://api.github.com/users/dektrium/gists{/gist_id}","starred_url":"https://api.github.com/users/dektrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dektrium/subscriptions","organizations_url":"https://api.github.com/users/dektrium/orgs","repos_url":"https://api.github.com/users/dektrium/repos","events_url":"https://api.github.com/users/dektrium/events{/privacy}","received_events_url":"https://api.github.com/users/dektrium/received_events","type":"Organization","site_admin":false},"repo":{"id":14082447,"name":"yii2-user","full_name":"dektrium/yii2-user","owner":{"login":"dektrium","id":4910348,"avatar_url":"https://avatars.githubusercontent.com/u/4910348?v=3","gravatar_id":"","url":"https://api.github.com/users/dektrium","html_url":"https://github.com/dektrium","followers_url":"https://api.github.com/users/dektrium/followers","following_url":"https://api.github.com/users/dektrium/following{/other_user}","gists_url":"https://api.github.com/users/dektrium/gists{/gist_id}","starred_url":"https://api.github.com/users/dektrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dektrium/subscriptions","organizations_url":"https://api.github.com/users/dektrium/orgs","repos_url":"https://api.github.com/users/dektrium/repos","events_url":"https://api.github.com/users/dektrium/events{/privacy}","received_events_url":"https://api.github.com/users/dektrium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dektrium/yii2-user","description":"Flexible user registration and authentication module for Yii2","fork":false,"url":"https://api.github.com/repos/dektrium/yii2-user","forks_url":"https://api.github.com/repos/dektrium/yii2-user/forks","keys_url":"https://api.github.com/repos/dektrium/yii2-user/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dektrium/yii2-user/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dektrium/yii2-user/teams","hooks_url":"https://api.github.com/repos/dektrium/yii2-user/hooks","issue_events_url":"https://api.github.com/repos/dektrium/yii2-user/issues/events{/number}","events_url":"https://api.github.com/repos/dektrium/yii2-user/events","assignees_url":"https://api.github.com/repos/dektrium/yii2-user/assignees{/user}","branches_url":"https://api.github.com/repos/dektrium/yii2-user/branches{/branch}","tags_url":"https://api.github.com/repos/dektrium/yii2-user/tags","blobs_url":"https://api.github.com/repos/dektrium/yii2-user/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dektrium/yii2-user/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dektrium/yii2-user/git/refs{/sha}","trees_url":"https://api.github.com/repos/dektrium/yii2-user/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dektrium/yii2-user/statuses/{sha}","languages_url":"https://api.github.com/repos/dektrium/yii2-user/languages","stargazers_url":"https://api.github.com/repos/dektrium/yii2-user/stargazers","contributors_url":"https://api.github.com/repos/dektrium/yii2-user/contributors","subscribers_url":"https://api.github.com/repos/dektrium/yii2-user/subscribers","subscription_url":"https://api.github.com/repos/dektrium/yii2-user/subscription","commits_url":"https://api.github.com/repos/dektrium/yii2-user/commits{/sha}","git_commits_url":"https://api.github.com/repos/dektrium/yii2-user/git/commits{/sha}","comments_url":"https://api.github.com/repos/dektrium/yii2-user/comments{/number}","issue_comment_url":"https://api.github.com/repos/dektrium/yii2-user/issues/comments/{number}","contents_url":"https://api.github.com/repos/dektrium/yii2-user/contents/{+path}","compare_url":"https://api.github.com/repos/dektrium/yii2-user/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dektrium/yii2-user/merges","archive_url":"https://api.github.com/repos/dektrium/yii2-user/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dektrium/yii2-user/downloads","issues_url":"https://api.github.com/repos/dektrium/yii2-user/issues{/number}","pulls_url":"https://api.github.com/repos/dektrium/yii2-user/pulls{/number}","milestones_url":"https://api.github.com/repos/dektrium/yii2-user/milestones{/number}","notifications_url":"https://api.github.com/repos/dektrium/yii2-user/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dektrium/yii2-user/labels{/name}","releases_url":"https://api.github.com/repos/dektrium/yii2-user/releases{/id}","created_at":"2013-11-03T09:52:31Z","updated_at":"2015-01-03T12:15:13Z","pushed_at":"2015-01-03T12:15:51Z","git_url":"git://github.com/dektrium/yii2-user.git","ssh_url":"git@github.com:dektrium/yii2-user.git","clone_url":"https://github.com/dektrium/yii2-user.git","svn_url":"https://github.com/dektrium/yii2-user","homepage":"http://yii2-user.dmeroff.ru","size":2115,"stargazers_count":129,"watchers_count":129,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":4,"forks":75,"open_issues":4,"watchers":129,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dektrium/yii2-user/pulls/218"},"html":{"href":"https://github.com/dektrium/yii2-user/pull/218"},"issue":{"href":"https://api.github.com/repos/dektrium/yii2-user/issues/218"},"comments":{"href":"https://api.github.com/repos/dektrium/yii2-user/issues/218/comments"},"review_comments":{"href":"https://api.github.com/repos/dektrium/yii2-user/pulls/218/comments"},"review_comment":{"href":"https://api.github.com/repos/dektrium/yii2-user/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dektrium/yii2-user/pulls/218/commits"},"statuses":{"href":"https://api.github.com/repos/dektrium/yii2-user/statuses/26ce3ae5da0f6e3335c72d2ca23c17a3bac183d8"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"dmeroff","id":1734389,"avatar_url":"https://avatars.githubusercontent.com/u/1734389?v=3","gravatar_id":"","url":"https://api.github.com/users/dmeroff","html_url":"https://github.com/dmeroff","followers_url":"https://api.github.com/users/dmeroff/followers","following_url":"https://api.github.com/users/dmeroff/following{/other_user}","gists_url":"https://api.github.com/users/dmeroff/gists{/gist_id}","starred_url":"https://api.github.com/users/dmeroff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmeroff/subscriptions","organizations_url":"https://api.github.com/users/dmeroff/orgs","repos_url":"https://api.github.com/users/dmeroff/repos","events_url":"https://api.github.com/users/dmeroff/events{/privacy}","received_events_url":"https://api.github.com/users/dmeroff/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":0,"changed_files":1}}