GitHub PullRequestReviewCommentEvent at 2014-06-18 10:55:11
Repository: cakephp
Actor: dereuromark
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/comments/13909311","id":13909311,"diff_hunk":"@@ -584,26 +584,19 @@ public function mapActions(array $map = array()) {\n /**\n  * Log a user in.\n  *\n- * If a $user is provided that data will be stored as the logged in user. If `$user` is empty or not\n- * specified, the request will be used to identify a user. If the identification was successful,\n- * the user record is written to the session key specified in AuthComponent::$sessionKey. Logging in\n- * will also change the session id in order to help mitigate session replays.\n+ * The provided user data will be stored as the logged in user. The user record\n+ * is written to the session key specified in AuthComponent::$sessionKey. Logging\n+ * in will also change the session id in order to help mitigate session replays.\n  *\n- * @param array $user Either an array of user data, or null to identify a user using the current request.\n- * @return bool True on login success, false on failure\n+ * @param array $user Array of user data.\n+ * @return void\n  * @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#identifying-users-and-logging-them-in\n  */\n-\tpublic function login($user = null) {\n+\tpublic function login(array $user) {","path":"src/Controller/Component/AuthComponent.php","position":19,"original_position":19,"commit_id":"8e5b2c722fdf4029142b0b885b858aeb49885ebd","original_commit_id":"8e5b2c722fdf4029142b0b885b858aeb49885ebd","user":{"login":"dereuromark","id":39854,"avatar_url":"https://avatars.githubusercontent.com/u/39854?","gravatar_id":"6b6225db96d6fb4a34c6d50a9171d13f","url":"https://api.github.com/users/dereuromark","html_url":"https://github.com/dereuromark","followers_url":"https://api.github.com/users/dereuromark/followers","following_url":"https://api.github.com/users/dereuromark/following{/other_user}","gists_url":"https://api.github.com/users/dereuromark/gists{/gist_id}","starred_url":"https://api.github.com/users/dereuromark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereuromark/subscriptions","organizations_url":"https://api.github.com/users/dereuromark/orgs","repos_url":"https://api.github.com/users/dereuromark/repos","events_url":"https://api.github.com/users/dereuromark/events{/privacy}","received_events_url":"https://api.github.com/users/dereuromark/received_events","type":"User","site_admin":false},"body":"Yeah I think if the login() method was named update() for something it would be clearer that this does not authenticate (anymore).","created_at":"2014-06-18T10:55:11Z","updated_at":"2014-06-18T10:55:11Z","html_url":"https://github.com/cakephp/cakephp/pull/3735#discussion_r13909311","pull_request_url":"https://api.github.com/repos/cakephp/cakephp/pulls/3735","_links":{"self":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/comments/13909311"},"html":{"href":"https://github.com/cakephp/cakephp/pull/3735#discussion_r13909311"},"pull_request":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/3735"}}},"pull_request":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/3735","id":17277114,"html_url":"https://github.com/cakephp/cakephp/pull/3735","diff_url":"https://github.com/cakephp/cakephp/pull/3735.diff","patch_url":"https://github.com/cakephp/cakephp/pull/3735.patch","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/3735","number":3735,"state":"open","title":"Remove use of request info to identify user in AuthComponent::login().","user":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?","gravatar_id":"376c87d7f023547d22227f2e25279591","url":"https://api.github.com/users/ADmad","html_url":"https://github.com/ADmad","followers_url":"https://api.github.com/users/ADmad/followers","following_url":"https://api.github.com/users/ADmad/following{/other_user}","gists_url":"https://api.github.com/users/ADmad/gists{/gist_id}","starred_url":"https://api.github.com/users/ADmad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADmad/subscriptions","organizations_url":"https://api.github.com/users/ADmad/orgs","repos_url":"https://api.github.com/users/ADmad/repos","events_url":"https://api.github.com/users/ADmad/events{/privacy}","received_events_url":"https://api.github.com/users/ADmad/received_events","type":"User","site_admin":false},"body":"Your login action would now be similar to:\r\n```php\r\n...\r\nif ($this->request->is('post')) {\r\n    $user = $this->Auth->identify();\r\n    if ($user) {\r\n        $this->Auth->login($user);\r\n        // redirect somewhere\r\n    }\r\n    // set error flash\r\n}\r\n...\r\n```","created_at":"2014-06-18T06:23:52Z","updated_at":"2014-06-18T10:55:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e6f7878e7449ff1825955b18448a12239c3219d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cakephp/cakephp/pulls/3735/commits","review_comments_url":"https://api.github.com/repos/cakephp/cakephp/pulls/3735/comments","review_comment_url":"https://api.github.com/repos/cakephp/cakephp/pulls/comments/{number}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/3735/comments","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/8e5b2c722fdf4029142b0b885b858aeb49885ebd","head":{"label":"ADmad:3.0-auth","ref":"3.0-auth","sha":"8e5b2c722fdf4029142b0b885b858aeb49885ebd","user":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?","gravatar_id":"376c87d7f023547d22227f2e25279591","url":"https://api.github.com/users/ADmad","html_url":"https://github.com/ADmad","followers_url":"https://api.github.com/users/ADmad/followers","following_url":"https://api.github.com/users/ADmad/following{/other_user}","gists_url":"https://api.github.com/users/ADmad/gists{/gist_id}","starred_url":"https://api.github.com/users/ADmad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADmad/subscriptions","organizations_url":"https://api.github.com/users/ADmad/orgs","repos_url":"https://api.github.com/users/ADmad/repos","events_url":"https://api.github.com/users/ADmad/events{/privacy}","received_events_url":"https://api.github.com/users/ADmad/received_events","type":"User","site_admin":false},"repo":{"id":1198215,"name":"cakephp","full_name":"ADmad/cakephp","owner":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?","gravatar_id":"376c87d7f023547d22227f2e25279591","url":"https://api.github.com/users/ADmad","html_url":"https://github.com/ADmad","followers_url":"https://api.github.com/users/ADmad/followers","following_url":"https://api.github.com/users/ADmad/following{/other_user}","gists_url":"https://api.github.com/users/ADmad/gists{/gist_id}","starred_url":"https://api.github.com/users/ADmad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADmad/subscriptions","organizations_url":"https://api.github.com/users/ADmad/orgs","repos_url":"https://api.github.com/users/ADmad/repos","events_url":"https://api.github.com/users/ADmad/events{/privacy}","received_events_url":"https://api.github.com/users/ADmad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ADmad/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":true,"url":"https://api.github.com/repos/ADmad/cakephp","forks_url":"https://api.github.com/repos/ADmad/cakephp/forks","keys_url":"https://api.github.com/repos/ADmad/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ADmad/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ADmad/cakephp/teams","hooks_url":"https://api.github.com/repos/ADmad/cakephp/hooks","issue_events_url":"https://api.github.com/repos/ADmad/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/ADmad/cakephp/events","assignees_url":"https://api.github.com/repos/ADmad/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/ADmad/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/ADmad/cakephp/tags","blobs_url":"https://api.github.com/repos/ADmad/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ADmad/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ADmad/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ADmad/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ADmad/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/ADmad/cakephp/languages","stargazers_url":"https://api.github.com/repos/ADmad/cakephp/stargazers","contributors_url":"https://api.github.com/repos/ADmad/cakephp/contributors","subscribers_url":"https://api.github.com/repos/ADmad/cakephp/subscribers","subscription_url":"https://api.github.com/repos/ADmad/cakephp/subscription","commits_url":"https://api.github.com/repos/ADmad/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ADmad/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ADmad/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ADmad/cakephp/issues/comments/{number}","contents_url":"https://api.github.com/repos/ADmad/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/ADmad/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ADmad/cakephp/merges","archive_url":"https://api.github.com/repos/ADmad/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ADmad/cakephp/downloads","issues_url":"https://api.github.com/repos/ADmad/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/ADmad/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/ADmad/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/ADmad/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ADmad/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/ADmad/cakephp/releases{/id}","created_at":"2010-12-26T06:44:37Z","updated_at":"2014-06-18T08:07:37Z","pushed_at":"2014-06-18T08:05:17Z","git_url":"git://github.com/ADmad/cakephp.git","ssh_url":"git@github.com:ADmad/cakephp.git","clone_url":"https://github.com/ADmad/cakephp.git","svn_url":"https://github.com/ADmad/cakephp","homepage":"http://cakephp.org","size":59128,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"cakephp:3.0","ref":"3.0","sha":"5ed2c519a42091d5eed613ca8f26562c0c95a133","user":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?","gravatar_id":"12cd092be901674cdbf0d3d964e945d5","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"repo":{"id":656494,"name":"cakephp","full_name":"cakephp/cakephp","owner":{"login":"cakephp","id":23666,"avatar_url":"https://avatars.githubusercontent.com/u/23666?","gravatar_id":"12cd092be901674cdbf0d3d964e945d5","url":"https://api.github.com/users/cakephp","html_url":"https://github.com/cakephp","followers_url":"https://api.github.com/users/cakephp/followers","following_url":"https://api.github.com/users/cakephp/following{/other_user}","gists_url":"https://api.github.com/users/cakephp/gists{/gist_id}","starred_url":"https://api.github.com/users/cakephp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cakephp/subscriptions","organizations_url":"https://api.github.com/users/cakephp/orgs","repos_url":"https://api.github.com/users/cakephp/repos","events_url":"https://api.github.com/users/cakephp/events{/privacy}","received_events_url":"https://api.github.com/users/cakephp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cakephp/cakephp","description":"CakePHP: The Rapid Development Framework for PHP - Official Repository","fork":false,"url":"https://api.github.com/repos/cakephp/cakephp","forks_url":"https://api.github.com/repos/cakephp/cakephp/forks","keys_url":"https://api.github.com/repos/cakephp/cakephp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cakephp/cakephp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cakephp/cakephp/teams","hooks_url":"https://api.github.com/repos/cakephp/cakephp/hooks","issue_events_url":"https://api.github.com/repos/cakephp/cakephp/issues/events{/number}","events_url":"https://api.github.com/repos/cakephp/cakephp/events","assignees_url":"https://api.github.com/repos/cakephp/cakephp/assignees{/user}","branches_url":"https://api.github.com/repos/cakephp/cakephp/branches{/branch}","tags_url":"https://api.github.com/repos/cakephp/cakephp/tags","blobs_url":"https://api.github.com/repos/cakephp/cakephp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cakephp/cakephp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cakephp/cakephp/git/refs{/sha}","trees_url":"https://api.github.com/repos/cakephp/cakephp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cakephp/cakephp/statuses/{sha}","languages_url":"https://api.github.com/repos/cakephp/cakephp/languages","stargazers_url":"https://api.github.com/repos/cakephp/cakephp/stargazers","contributors_url":"https://api.github.com/repos/cakephp/cakephp/contributors","subscribers_url":"https://api.github.com/repos/cakephp/cakephp/subscribers","subscription_url":"https://api.github.com/repos/cakephp/cakephp/subscription","commits_url":"https://api.github.com/repos/cakephp/cakephp/commits{/sha}","git_commits_url":"https://api.github.com/repos/cakephp/cakephp/git/commits{/sha}","comments_url":"https://api.github.com/repos/cakephp/cakephp/comments{/number}","issue_comment_url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/{number}","contents_url":"https://api.github.com/repos/cakephp/cakephp/contents/{+path}","compare_url":"https://api.github.com/repos/cakephp/cakephp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cakephp/cakephp/merges","archive_url":"https://api.github.com/repos/cakephp/cakephp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cakephp/cakephp/downloads","issues_url":"https://api.github.com/repos/cakephp/cakephp/issues{/number}","pulls_url":"https://api.github.com/repos/cakephp/cakephp/pulls{/number}","milestones_url":"https://api.github.com/repos/cakephp/cakephp/milestones{/number}","notifications_url":"https://api.github.com/repos/cakephp/cakephp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cakephp/cakephp/labels{/name}","releases_url":"https://api.github.com/repos/cakephp/cakephp/releases{/id}","created_at":"2010-05-08T14:38:22Z","updated_at":"2014-06-18T08:41:42Z","pushed_at":"2014-06-18T08:41:42Z","git_url":"git://github.com/cakephp/cakephp.git","ssh_url":"git@github.com:cakephp/cakephp.git","clone_url":"https://github.com/cakephp/cakephp.git","svn_url":"https://github.com/cakephp/cakephp","homepage":"http://cakephp.org","size":136105,"stargazers_count":4873,"watchers_count":4873,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2039,"mirror_url":null,"open_issues_count":151,"forks":2039,"open_issues":151,"watchers":4873,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/3735"},"html":{"href":"https://github.com/cakephp/cakephp/pull/3735"},"issue":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/3735"},"comments":{"href":"https://api.github.com/repos/cakephp/cakephp/issues/3735/comments"},"review_comments":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/3735/comments"},"review_comment":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/cakephp/cakephp/pulls/3735/commits"},"statuses":{"href":"https://api.github.com/repos/cakephp/cakephp/statuses/8e5b2c722fdf4029142b0b885b858aeb49885ebd"}}}}