Hi all,
I am using cakePHP 1.26. In a .ctp file, I have a few like of codes like this:
$sess = $this->Session->check('user');
if($sess){
// do soemthing
}
else{
// do soemthing then
}
But I got this error then:
Fatal error: Call to a member function check() on a non-object in /home/vol12/mysite.com/htdocs/app/views/layouts/testing1.ctp on line 10
Can I use the Check method in a .ctp file to check if a session exists?