{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/6656","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/6656/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/6656/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/6656/events","html_url":"https://github.com/cakephp/cakephp/issues/6656","id":81680809,"number":6656,"title":"Make BaseAuthenticate::_findUser() return a query object?","user":{"login":"kevinquinnyo","id":593681,"avatar_url":"https://avatars.githubusercontent.com/u/593681?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinquinnyo","html_url":"https://github.com/kevinquinnyo","followers_url":"https://api.github.com/users/kevinquinnyo/followers","following_url":"https://api.github.com/users/kevinquinnyo/following{/other_user}","gists_url":"https://api.github.com/users/kevinquinnyo/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinquinnyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinquinnyo/subscriptions","organizations_url":"https://api.github.com/users/kevinquinnyo/orgs","repos_url":"https://api.github.com/users/kevinquinnyo/repos","events_url":"https://api.github.com/users/kevinquinnyo/events{/privacy}","received_events_url":"https://api.github.com/users/kevinquinnyo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/auth","name":"auth","color":"ffffff"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Enhancement","name":"Enhancement","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/31","html_url":"https://github.com/cakephp/cakephp/milestones/3.1.0","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/31/labels","id":919718,"number":31,"title":"3.1.0","description":"Backwards compatible with 3.0.x. Will require PHP 5.5\r\n\r\n### Specific issues\r\n\r\n* Adding the exception trace to the error view data. #6000 \r\n* Changed the translate behavior to support translation engines. #5958 \r\n* Database connection prefixes, or table prefixes.","creator":{"login":"lorenzo","id":37621,"avatar_url":"https://avatars.githubusercontent.com/u/37621?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo","html_url":"https://github.com/lorenzo","followers_url":"https://api.github.com/users/lorenzo/followers","following_url":"https://api.github.com/users/lorenzo/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo/subscriptions","organizations_url":"https://api.github.com/users/lorenzo/orgs","repos_url":"https://api.github.com/users/lorenzo/repos","events_url":"https://api.github.com/users/lorenzo/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo/received_events","type":"User","site_admin":false},"open_issues":50,"closed_issues":59,"state":"open","created_at":"2015-01-02T15:38:07Z","updated_at":"2015-05-29T19:08:41Z","due_on":"2015-07-26T04:00:00Z","closed_at":null},"comments":8,"created_at":"2015-05-28T00:03:47Z","updated_at":"2015-05-30T11:56:34Z","closed_at":null,"body":"When extending the BaseAuthenticate class I find myself sometimes wanting to do things with the result before it converts it to an array, and if so I end up having to rewrite the `_findUser()` method in my extended class instead of calling it.\r\n\r\nI was thinking a simple workaround that would preserve compatibility would be to break `_findUser()` into two methods:\r\n\r\n`_find()` (behaves much like an ORM find method and returns a query)\r\n`_findUser()` (calls `_find()` internally)\r\n\r\nUntested gist of how this might work:  https://gist.github.com/kevinquinnyo/96ff4130f882101e24d5#file-gistfile1-php\r\n\r\nThis would allow developers to call `$this->_find()` from an extended class and have the option to do additional things with the query before returning a record array in their custom class's `authenticate()` method.\r\n\r\nGood idea?  Bad idea?  Terrible idea, gtfo?"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/107031381","html_url":"https://github.com/cakephp/cakephp/issues/6656#issuecomment-107031381","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/6656","id":107031381,"user":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?v=3","gravatar_id":"","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},"created_at":"2015-05-30T11:56:34Z","updated_at":"2015-05-30T11:56:34Z","body":"There should be, I'll look into it."}}