{"action":"created","comment":{"url":"https://api.github.com/repos/TryGhost/Ghost/pulls/comments/76185257","id":76185257,"diff_hunk":"@@ -554,6 +554,12 @@ User = ghostBookshelf.Model.extend({\n                 return bcryptCompare(object.password, user.get('password')).then(function then(matched) {\n                     if (!matched) {\n                         return Promise.resolve(self.setWarning(user, {validate: false})).then(function then(remaining) {\n+                            if (remaining === 0) {","path":"core/server/models/user.js","position":4,"original_position":4,"commit_id":"dbc81dc4d735f636827602011a6fc29841a2e950","original_commit_id":"dbc81dc4d735f636827602011a6fc29841a2e950","user":{"login":"kirrg001","id":1160712,"avatar_url":"https://avatars.githubusercontent.com/u/1160712?v=3","gravatar_id":"","url":"https://api.github.com/users/kirrg001","html_url":"https://github.com/kirrg001","followers_url":"https://api.github.com/users/kirrg001/followers","following_url":"https://api.github.com/users/kirrg001/following{/other_user}","gists_url":"https://api.github.com/users/kirrg001/gists{/gist_id}","starred_url":"https://api.github.com/users/kirrg001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirrg001/subscriptions","organizations_url":"https://api.github.com/users/kirrg001/orgs","repos_url":"https://api.github.com/users/kirrg001/repos","events_url":"https://api.github.com/users/kirrg001/events{/privacy}","received_events_url":"https://api.github.com/users/kirrg001/received_events","type":"User","site_admin":false},"body":"if you would change `if (level > 4) {` in line `529` to `if (level > 3) {`, then it works without having this extra check here. ","created_at":"2016-08-25T06:10:44Z","updated_at":"2016-08-25T06:10:44Z","html_url":"https://github.com/TryGhost/Ghost/pull/7263#discussion_r76185257","pull_request_url":"https://api.github.com/repos/TryGhost/Ghost/pulls/7263","_links":{"self":{"href":"https://api.github.com/repos/TryGhost/Ghost/pulls/comments/76185257"},"html":{"href":"https://github.com/TryGhost/Ghost/pull/7263#discussion_r76185257"},"pull_request":{"href":"https://api.github.com/repos/TryGhost/Ghost/pulls/7263"}}},"pull_request":{"url":"https://api.github.com/repos/TryGhost/Ghost/pulls/7263","id":82583079,"html_url":"https://github.com/TryGhost/Ghost/pull/7263","diff_url":"https://github.com/TryGhost/Ghost/pull/7263.diff","patch_url":"https://github.com/TryGhost/Ghost/pull/7263.patch","issue_url":"https://api.github.com/repos/TryGhost/Ghost/issues/7263","number":7263,"state":"open","locked":false,"title":"Show correct error message the first time account is locked","user":{"login":"acburdine","id":5167581,"avatar_url":"https://avatars.githubusercontent.com/u/5167581?v=3","gravatar_id":"","url":"https://api.github.com/users/acburdine","html_url":"https://github.com/acburdine","followers_url":"https://api.github.com/users/acburdine/followers","following_url":"https://api.github.com/users/acburdine/following{/other_user}","gists_url":"https://api.github.com/users/acburdine/gists{/gist_id}","starred_url":"https://api.github.com/users/acburdine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acburdine/subscriptions","organizations_url":"https://api.github.com/users/acburdine/orgs","repos_url":"https://api.github.com/users/acburdine/repos","events_url":"https://api.github.com/users/acburdine/events{/privacy}","received_events_url":"https://api.github.com/users/acburdine/received_events","type":"User","site_admin":false},"body":"closes #7251\r\n- check if remaining attemps is 0, if so then show account locked error\r\n\r\nTurns out this was a bug in the user model. Regardless, this fixes it\r\n\r\n- [x] tests","created_at":"2016-08-24T17:20:38Z","updated_at":"2016-08-25T06:10:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8356b3cea413f0abe9a1556915cefe13a893542","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/TryGhost/Ghost/pulls/7263/commits","review_comments_url":"https://api.github.com/repos/TryGhost/Ghost/pulls/7263/comments","review_comment_url":"https://api.github.com/repos/TryGhost/Ghost/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TryGhost/Ghost/issues/7263/comments","statuses_url":"https://api.github.com/repos/TryGhost/Ghost/statuses/dbc81dc4d735f636827602011a6fc29841a2e950","head":{"label":"acburdine:spam-prevention-error-fix","ref":"spam-prevention-error-fix","sha":"dbc81dc4d735f636827602011a6fc29841a2e950","user":{"login":"acburdine","id":5167581,"avatar_url":"https://avatars.githubusercontent.com/u/5167581?v=3","gravatar_id":"","url":"https://api.github.com/users/acburdine","html_url":"https://github.com/acburdine","followers_url":"https://api.github.com/users/acburdine/followers","following_url":"https://api.github.com/users/acburdine/following{/other_user}","gists_url":"https://api.github.com/users/acburdine/gists{/gist_id}","starred_url":"https://api.github.com/users/acburdine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acburdine/subscriptions","organizations_url":"https://api.github.com/users/acburdine/orgs","repos_url":"https://api.github.com/users/acburdine/repos","events_url":"https://api.github.com/users/acburdine/events{/privacy}","received_events_url":"https://api.github.com/users/acburdine/received_events","type":"User","site_admin":false},"repo":{"id":32867877,"name":"Ghost","full_name":"acburdine/Ghost","owner":{"login":"acburdine","id":5167581,"avatar_url":"https://avatars.githubusercontent.com/u/5167581?v=3","gravatar_id":"","url":"https://api.github.com/users/acburdine","html_url":"https://github.com/acburdine","followers_url":"https://api.github.com/users/acburdine/followers","following_url":"https://api.github.com/users/acburdine/following{/other_user}","gists_url":"https://api.github.com/users/acburdine/gists{/gist_id}","starred_url":"https://api.github.com/users/acburdine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acburdine/subscriptions","organizations_url":"https://api.github.com/users/acburdine/orgs","repos_url":"https://api.github.com/users/acburdine/repos","events_url":"https://api.github.com/users/acburdine/events{/privacy}","received_events_url":"https://api.github.com/users/acburdine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/acburdine/Ghost","description":"Just a blogging platform","fork":true,"url":"https://api.github.com/repos/acburdine/Ghost","forks_url":"https://api.github.com/repos/acburdine/Ghost/forks","keys_url":"https://api.github.com/repos/acburdine/Ghost/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acburdine/Ghost/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acburdine/Ghost/teams","hooks_url":"https://api.github.com/repos/acburdine/Ghost/hooks","issue_events_url":"https://api.github.com/repos/acburdine/Ghost/issues/events{/number}","events_url":"https://api.github.com/repos/acburdine/Ghost/events","assignees_url":"https://api.github.com/repos/acburdine/Ghost/assignees{/user}","branches_url":"https://api.github.com/repos/acburdine/Ghost/branches{/branch}","tags_url":"https://api.github.com/repos/acburdine/Ghost/tags","blobs_url":"https://api.github.com/repos/acburdine/Ghost/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acburdine/Ghost/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acburdine/Ghost/git/refs{/sha}","trees_url":"https://api.github.com/repos/acburdine/Ghost/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acburdine/Ghost/statuses/{sha}","languages_url":"https://api.github.com/repos/acburdine/Ghost/languages","stargazers_url":"https://api.github.com/repos/acburdine/Ghost/stargazers","contributors_url":"https://api.github.com/repos/acburdine/Ghost/contributors","subscribers_url":"https://api.github.com/repos/acburdine/Ghost/subscribers","subscription_url":"https://api.github.com/repos/acburdine/Ghost/subscription","commits_url":"https://api.github.com/repos/acburdine/Ghost/commits{/sha}","git_commits_url":"https://api.github.com/repos/acburdine/Ghost/git/commits{/sha}","comments_url":"https://api.github.com/repos/acburdine/Ghost/comments{/number}","issue_comment_url":"https://api.github.com/repos/acburdine/Ghost/issues/comments{/number}","contents_url":"https://api.github.com/repos/acburdine/Ghost/contents/{+path}","compare_url":"https://api.github.com/repos/acburdine/Ghost/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acburdine/Ghost/merges","archive_url":"https://api.github.com/repos/acburdine/Ghost/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acburdine/Ghost/downloads","issues_url":"https://api.github.com/repos/acburdine/Ghost/issues{/number}","pulls_url":"https://api.github.com/repos/acburdine/Ghost/pulls{/number}","milestones_url":"https://api.github.com/repos/acburdine/Ghost/milestones{/number}","notifications_url":"https://api.github.com/repos/acburdine/Ghost/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acburdine/Ghost/labels{/name}","releases_url":"https://api.github.com/repos/acburdine/Ghost/releases{/id}","deployments_url":"https://api.github.com/repos/acburdine/Ghost/deployments","created_at":"2015-03-25T13:58:25Z","updated_at":"2016-01-11T14:24:38Z","pushed_at":"2016-08-24T20:03:17Z","git_url":"git://github.com/acburdine/Ghost.git","ssh_url":"git@github.com:acburdine/Ghost.git","clone_url":"https://github.com/acburdine/Ghost.git","svn_url":"https://github.com/acburdine/Ghost","homepage":"https://ghost.org","size":21190,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"TryGhost:master","ref":"master","sha":"02ca986ed7c1c9d345f43205231d2354e7788b67","user":{"login":"TryGhost","id":2178663,"avatar_url":"https://avatars.githubusercontent.com/u/2178663?v=3","gravatar_id":"","url":"https://api.github.com/users/TryGhost","html_url":"https://github.com/TryGhost","followers_url":"https://api.github.com/users/TryGhost/followers","following_url":"https://api.github.com/users/TryGhost/following{/other_user}","gists_url":"https://api.github.com/users/TryGhost/gists{/gist_id}","starred_url":"https://api.github.com/users/TryGhost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TryGhost/subscriptions","organizations_url":"https://api.github.com/users/TryGhost/orgs","repos_url":"https://api.github.com/users/TryGhost/repos","events_url":"https://api.github.com/users/TryGhost/events{/privacy}","received_events_url":"https://api.github.com/users/TryGhost/received_events","type":"Organization","site_admin":false},"repo":{"id":9852918,"name":"Ghost","full_name":"TryGhost/Ghost","owner":{"login":"TryGhost","id":2178663,"avatar_url":"https://avatars.githubusercontent.com/u/2178663?v=3","gravatar_id":"","url":"https://api.github.com/users/TryGhost","html_url":"https://github.com/TryGhost","followers_url":"https://api.github.com/users/TryGhost/followers","following_url":"https://api.github.com/users/TryGhost/following{/other_user}","gists_url":"https://api.github.com/users/TryGhost/gists{/gist_id}","starred_url":"https://api.github.com/users/TryGhost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TryGhost/subscriptions","organizations_url":"https://api.github.com/users/TryGhost/orgs","repos_url":"https://api.github.com/users/TryGhost/repos","events_url":"https://api.github.com/users/TryGhost/events{/privacy}","received_events_url":"https://api.github.com/users/TryGhost/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TryGhost/Ghost","description":"Just a blogging platform","fork":false,"url":"https://api.github.com/repos/TryGhost/Ghost","forks_url":"https://api.github.com/repos/TryGhost/Ghost/forks","keys_url":"https://api.github.com/repos/TryGhost/Ghost/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TryGhost/Ghost/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TryGhost/Ghost/teams","hooks_url":"https://api.github.com/repos/TryGhost/Ghost/hooks","issue_events_url":"https://api.github.com/repos/TryGhost/Ghost/issues/events{/number}","events_url":"https://api.github.com/repos/TryGhost/Ghost/events","assignees_url":"https://api.github.com/repos/TryGhost/Ghost/assignees{/user}","branches_url":"https://api.github.com/repos/TryGhost/Ghost/branches{/branch}","tags_url":"https://api.github.com/repos/TryGhost/Ghost/tags","blobs_url":"https://api.github.com/repos/TryGhost/Ghost/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TryGhost/Ghost/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TryGhost/Ghost/git/refs{/sha}","trees_url":"https://api.github.com/repos/TryGhost/Ghost/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TryGhost/Ghost/statuses/{sha}","languages_url":"https://api.github.com/repos/TryGhost/Ghost/languages","stargazers_url":"https://api.github.com/repos/TryGhost/Ghost/stargazers","contributors_url":"https://api.github.com/repos/TryGhost/Ghost/contributors","subscribers_url":"https://api.github.com/repos/TryGhost/Ghost/subscribers","subscription_url":"https://api.github.com/repos/TryGhost/Ghost/subscription","commits_url":"https://api.github.com/repos/TryGhost/Ghost/commits{/sha}","git_commits_url":"https://api.github.com/repos/TryGhost/Ghost/git/commits{/sha}","comments_url":"https://api.github.com/repos/TryGhost/Ghost/comments{/number}","issue_comment_url":"https://api.github.com/repos/TryGhost/Ghost/issues/comments{/number}","contents_url":"https://api.github.com/repos/TryGhost/Ghost/contents/{+path}","compare_url":"https://api.github.com/repos/TryGhost/Ghost/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TryGhost/Ghost/merges","archive_url":"https://api.github.com/repos/TryGhost/Ghost/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TryGhost/Ghost/downloads","issues_url":"https://api.github.com/repos/TryGhost/Ghost/issues{/number}","pulls_url":"https://api.github.com/repos/TryGhost/Ghost/pulls{/number}","milestones_url":"https://api.github.com/repos/TryGhost/Ghost/milestones{/number}","notifications_url":"https://api.github.com/repos/TryGhost/Ghost/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TryGhost/Ghost/labels{/name}","releases_url":"https://api.github.com/repos/TryGhost/Ghost/releases{/id}","deployments_url":"https://api.github.com/repos/TryGhost/Ghost/deployments","created_at":"2013-05-04T11:09:13Z","updated_at":"2016-08-25T06:04:55Z","pushed_at":"2016-08-25T06:09:40Z","git_url":"git://github.com/TryGhost/Ghost.git","ssh_url":"git@github.com:TryGhost/Ghost.git","clone_url":"https://github.com/TryGhost/Ghost.git","svn_url":"https://github.com/TryGhost/Ghost","homepage":"https://ghost.org","size":53162,"stargazers_count":20444,"watchers_count":20444,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4968,"mirror_url":null,"open_issues_count":222,"forks":4968,"open_issues":222,"watchers":20444,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TryGhost/Ghost/pulls/7263"},"html":{"href":"https://github.com/TryGhost/Ghost/pull/7263"},"issue":{"href":"https://api.github.com/repos/TryGhost/Ghost/issues/7263"},"comments":{"href":"https://api.github.com/repos/TryGhost/Ghost/issues/7263/comments"},"review_comments":{"href":"https://api.github.com/repos/TryGhost/Ghost/pulls/7263/comments"},"review_comment":{"href":"https://api.github.com/repos/TryGhost/Ghost/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TryGhost/Ghost/pulls/7263/commits"},"statuses":{"href":"https://api.github.com/repos/TryGhost/Ghost/statuses/dbc81dc4d735f636827602011a6fc29841a2e950"}}}}
{"actor":{"display_login":"kirrg001"}}