{"action":"created","issue":{"url":"https://api.github.com/repos/geomorillo/Auth/issues/2","labels_url":"https://api.github.com/repos/geomorillo/Auth/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/geomorillo/Auth/issues/2/comments","events_url":"https://api.github.com/repos/geomorillo/Auth/issues/2/events","html_url":"https://github.com/geomorillo/Auth/issues/2","id":123899088,"number":2,"title":"Can't get login to work properly.","user":{"login":"davarravad","id":12216243,"avatar_url":"https://avatars.githubusercontent.com/u/12216243?v=3","gravatar_id":"","url":"https://api.github.com/users/davarravad","html_url":"https://github.com/davarravad","followers_url":"https://api.github.com/users/davarravad/followers","following_url":"https://api.github.com/users/davarravad/following{/other_user}","gists_url":"https://api.github.com/users/davarravad/gists{/gist_id}","starred_url":"https://api.github.com/users/davarravad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davarravad/subscriptions","organizations_url":"https://api.github.com/users/davarravad/orgs","repos_url":"https://api.github.com/users/davarravad/repos","events_url":"https://api.github.com/users/davarravad/events{/privacy}","received_events_url":"https://api.github.com/users/davarravad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-25T22:06:26Z","updated_at":"2015-12-26T04:29:07Z","closed_at":null,"body":"I have been trying to get this working all day.  I am using a login form that sends POST data to this login script.  I can not figure it out.  Any help is appreciated.\r\n\r\nControllers\\Auth.php\r\n\r\n```php\r\n<?php namespace controllers;\r\nuse \\Core\\View,\r\n\t\\Core\\Controller,\r\n\t\\Helpers\\Url,\r\n\t\\Helpers\\Request as Request;\r\n\r\nclass Auth extends Controller {\r\n\t\r\n\tprivate $auth;\r\n\t\r\n\tpublic function __construct(){\r\n\t\tparent::__construct();\r\n\t\t$this->auth = new \\Helpers\\Auth\\Auth();\r\n\t}\r\n\t\r\n\t// Logs the user into the system\r\n\tpublic function Login(){\r\n\t\t\r\n\t\tif($this->auth->isLogged()){\r\n\t\t\tUrl::redirect();\r\n\t\t}\r\n\t\t\r\n\t\tif(isset($_POST['submit'])){\r\n\t\t\t\t\r\n\t\t\t// Catch username an password inputs using the Request helper\r\n\t\t\t$username = Request::post('username');\r\n\t\t\t$password = Request::post('password');\r\n\t\t\t\r\n\t\t\t// Login Validation\r\n\t\t\tif($this->auth->login($username, $password)){\t\t\r\n\t\t\t\t// User is good to go\r\n\t\t\t\t//$data = array('LastLogin' => date('Y-m-d G:i:s'));\r\n\t\t\t\t//$where = array('id' => $this->auth->getID($username));\r\n\t\t\t\t//$this->auth->updateUser($data,$where);\r\n\t\t\t\t\r\n\t\t\t\t// Url::redirect();\r\n\t\t\t}else{\r\n\t\t\t\t// Bad login info\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$data['title'] = 'Login';\r\n\t\tView::rendertemplate('header',$data);\r\n\t\tView::render('auth/Login',$data,$errormsg,$successmsg);\r\n\t\tView::rendertemplate('footer',$data);\r\n\t\t\r\n\t}\r\n\t\r\n\t// Logs the user out of the system\r\n\tpublic function Logout(){\r\n\t\t$this->auth->logout();\r\n\t\tUrl::redirect();\r\n\t}\r\n\t\r\n}\r\n```\r\n\r\nAlso in the database: activitylog I get the following:\r\nusername: UNKNOWN\r\naction: AUTH_CHECKSESSION\r\nadditionalinfo: User session cookie deleted - Hash (36fc9404c889628c6f4b095e344ce25b) didn't exist\r\n\r\nThe sessions database is empty.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/geomorillo/Auth/issues/comments/167276723","html_url":"https://github.com/geomorillo/Auth/issues/2#issuecomment-167276723","issue_url":"https://api.github.com/repos/geomorillo/Auth/issues/2","id":167276723,"user":{"login":"adjoines","id":2178862,"avatar_url":"https://avatars.githubusercontent.com/u/2178862?v=3","gravatar_id":"","url":"https://api.github.com/users/adjoines","html_url":"https://github.com/adjoines","followers_url":"https://api.github.com/users/adjoines/followers","following_url":"https://api.github.com/users/adjoines/following{/other_user}","gists_url":"https://api.github.com/users/adjoines/gists{/gist_id}","starred_url":"https://api.github.com/users/adjoines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adjoines/subscriptions","organizations_url":"https://api.github.com/users/adjoines/orgs","repos_url":"https://api.github.com/users/adjoines/repos","events_url":"https://api.github.com/users/adjoines/events{/privacy}","received_events_url":"https://api.github.com/users/adjoines/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T04:29:07Z","updated_at":"2015-12-26T04:29:07Z","body":"I get logged in successfully as my database activitylog table says. But once I redirect to my index page, where am checking if am logged in\r\nif ($this->auth->isLogged()) {\r\n            echo \"logged\";\r\n            // \"User is logged you could load a view here if you want\";\r\n        } else {\r\n            echo \"not logged\";\r\n            //user not authenticated load a login view with a form with login and password inputs\r\n        }\r\nI am get the message \"not logged\".\r\n\r\nAny idea why? Everything else seems to be working well except for the fact that I think , the logged in cookie or session is not set."}}