{"action":"created","issue":{"url":"https://api.github.com/repos/UseMuffin/Footprint/issues/13","labels_url":"https://api.github.com/repos/UseMuffin/Footprint/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/UseMuffin/Footprint/issues/13/comments","events_url":"https://api.github.com/repos/UseMuffin/Footprint/issues/13/events","html_url":"https://github.com/UseMuffin/Footprint/issues/13","id":106030856,"number":13,"title":"FootprintBehavior's beforeSave doesn't seem to have the information it needs in it","user":{"login":"Cylindric","id":215695,"avatar_url":"https://avatars.githubusercontent.com/u/215695?v=3","gravatar_id":"","url":"https://api.github.com/users/Cylindric","html_url":"https://github.com/Cylindric","followers_url":"https://api.github.com/users/Cylindric/followers","following_url":"https://api.github.com/users/Cylindric/following{/other_user}","gists_url":"https://api.github.com/users/Cylindric/gists{/gist_id}","starred_url":"https://api.github.com/users/Cylindric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cylindric/subscriptions","organizations_url":"https://api.github.com/users/Cylindric/orgs","repos_url":"https://api.github.com/users/Cylindric/repos","events_url":"https://api.github.com/users/Cylindric/events{/privacy}","received_events_url":"https://api.github.com/users/Cylindric/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/UseMuffin/Footprint/labels/onhold","name":"onhold","color":"eb6420"},{"url":"https://api.github.com/repos/UseMuffin/Footprint/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-09-11T15:17:04Z","updated_at":"2016-01-31T14:53:39Z","closed_at":null,"body":"Hi. This isn't really an 'issue' so much as a query. I have, I think, followed the instructions for getting this set up, and if I put breakpoints in the FootprintListener and FootprintAwareTrait I can see the User data being set where it seems to need to be, however when it then reaches the beforeSave in the FootprintBehavior, $options doesn't seem to contain any data pertaining to the user.\r\n\r\nMy Table's initialise:\r\n```\r\n$this->addBehavior('Muffin/Footprint.Footprint', [\r\n    'events' => [\r\n        'Model.beforeSave' => [\r\n            'created_by' => 'new',\r\n            'modified_by' => 'always',\r\n        ]\r\n    ]\r\n]);\r\n```\r\n\r\nThe `$options` variable in the FootprintBehavior's beforeSave():\r\n```\r\nArrayObject::__set_state(array(\r\n   'atomic' => true,\r\n   'associated' => \r\n  array (\r\n    'characters' => \r\n    array (\r\n    ),\r\n    'createduser' => \r\n    array (\r\n    ),\r\n    'modifyuser' => \r\n    array (\r\n    ),\r\n  ),\r\n   'checkRules' => true,\r\n   'checkExisting' => true,\r\n   '_primary' => true,\r\n))\r\n```\r\n\r\n\r\nMy full [AppController](https://github.com/Cylindric/edge/blob/develop/App/src/Controller/AppController.php)\r\nMy full [XpTable](https://github.com/Cylindric/edge/blob/develop/App/src/Model/Table/XpTable.php)"},"comment":{"url":"https://api.github.com/repos/UseMuffin/Footprint/issues/comments/177515426","html_url":"https://github.com/UseMuffin/Footprint/issues/13#issuecomment-177515426","issue_url":"https://api.github.com/repos/UseMuffin/Footprint/issues/13","id":177515426,"user":{"login":"mattford","id":1078200,"avatar_url":"https://avatars.githubusercontent.com/u/1078200?v=3","gravatar_id":"","url":"https://api.github.com/users/mattford","html_url":"https://github.com/mattford","followers_url":"https://api.github.com/users/mattford/followers","following_url":"https://api.github.com/users/mattford/following{/other_user}","gists_url":"https://api.github.com/users/mattford/gists{/gist_id}","starred_url":"https://api.github.com/users/mattford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattford/subscriptions","organizations_url":"https://api.github.com/users/mattford/orgs","repos_url":"https://api.github.com/users/mattford/repos","events_url":"https://api.github.com/users/mattford/events{/privacy}","received_events_url":"https://api.github.com/users/mattford/received_events","type":"User","site_admin":false},"created_at":"2016-01-31T14:53:39Z","updated_at":"2016-01-31T14:53:39Z","body":"I'm having the same issue in my project, a little bit of investigation suggests the problem may be in CakePHP itself, as AuthComponent::_getUser() will short-circuit if the user can be retrieved from session storage without firing the Auth.afterIdentify event.\r\n\r\nAfter adding the following on line 690 of AuthComponent, the event is now firing, and the current user gets as far as FootprintListener, but doesn't seem to be getting to the model. \r\n\r\n`$event = $this->dispatchEvent('Auth.afterIdentify', [$user]);`\r\n\r\nGoing to keep investigating and see if I can find a fix\r\n\r\nMay be important, the model in question actually extends another model, so I have `PostsTable` which extends `Cake\\ORM\\Table` and `QuestionsTable` which extends `Cake\\ORM\\Entity`"}}