{"action":"created","issue":{"url":"https://api.github.com/repos/mako-framework/framework/issues/134","labels_url":"https://api.github.com/repos/mako-framework/framework/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/mako-framework/framework/issues/134/comments","events_url":"https://api.github.com/repos/mako-framework/framework/issues/134/events","html_url":"https://github.com/mako-framework/framework/issues/134","id":56126775,"number":134,"title":"Check Auth in route","user":{"login":"ConsoleTVs","id":6124435,"avatar_url":"https://avatars.githubusercontent.com/u/6124435?v=3","gravatar_id":"","url":"https://api.github.com/users/ConsoleTVs","html_url":"https://github.com/ConsoleTVs","followers_url":"https://api.github.com/users/ConsoleTVs/followers","following_url":"https://api.github.com/users/ConsoleTVs/following{/other_user}","gists_url":"https://api.github.com/users/ConsoleTVs/gists{/gist_id}","starred_url":"https://api.github.com/users/ConsoleTVs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConsoleTVs/subscriptions","organizations_url":"https://api.github.com/users/ConsoleTVs/orgs","repos_url":"https://api.github.com/users/ConsoleTVs/repos","events_url":"https://api.github.com/users/ConsoleTVs/events{/privacy}","received_events_url":"https://api.github.com/users/ConsoleTVs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-31T14:34:07Z","updated_at":"2015-01-31T17:38:16Z","closed_at":null,"body":"Hello there must be a way to check if the user is logged in in the route instead of using the same code 192'31239 times in each protected function, is there a way to do it with ->before or ->when? thanks!"},"comment":{"url":"https://api.github.com/repos/mako-framework/framework/issues/comments/72327457","html_url":"https://github.com/mako-framework/framework/issues/134#issuecomment-72327457","issue_url":"https://api.github.com/repos/mako-framework/framework/issues/134","id":72327457,"user":{"login":"ConsoleTVs","id":6124435,"avatar_url":"https://avatars.githubusercontent.com/u/6124435?v=3","gravatar_id":"","url":"https://api.github.com/users/ConsoleTVs","html_url":"https://github.com/ConsoleTVs","followers_url":"https://api.github.com/users/ConsoleTVs/followers","following_url":"https://api.github.com/users/ConsoleTVs/following{/other_user}","gists_url":"https://api.github.com/users/ConsoleTVs/gists{/gist_id}","starred_url":"https://api.github.com/users/ConsoleTVs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConsoleTVs/subscriptions","organizations_url":"https://api.github.com/users/ConsoleTVs/orgs","repos_url":"https://api.github.com/users/ConsoleTVs/repos","events_url":"https://api.github.com/users/ConsoleTVs/events{/privacy}","received_events_url":"https://api.github.com/users/ConsoleTVs/received_events","type":"User","site_admin":false},"created_at":"2015-01-31T17:38:16Z","updated_at":"2015-01-31T17:38:16Z","body":"Alright, I got this code:\r\n\r\nuse mako\\auth\\gatekeeper;\r\n\r\n\r\n$filters->register('auth.check_login', function(gatekeeper $gatekeeper)\r\n{\r\n\t$isLoggedIn = $this->gatekeeper->isLoggedIn();\r\n\tvar_dump($isLoggedIn);\r\n});\r\n\r\nUndefined property: mako\\application\\Web::$gatekeeper"}}