[eluser]stuffradio[/eluser]
For the life of me I can't figure out what's wrong.
Here is the code:
Code:
function artists()
{
$data['logged_in'] = $this->loginlib->checkSession();
$data['error'] = "You're not an artist!";
$info = $this->users->getInfo();
if (!$this->loginlib->checkSession())
{
$this->login();
} else {
$this->load->view('head', $data);
if ($info->group <= 2)
{
$this->load->view('artists', $data);
} else {
$this->load->view('error', $data);
}
}
}
Here is the error:
Quote:A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: controllers/home.php
Line Number: 72
Line in question: if ($info->group <= 2)