I found another bug in my cms where I”m using the Tank Auth library and need to fix my cpanel controller.
What needs to happen is when the cpanel is attempted to be directly accessed it needs to perform the if statement check to see if the user is logged in. If they are not logged in they need to be directed to the login page. This is not working for me. I think its because of the ! mark in there. This if statement is inside my function construct.
if ($this->tank_auth->!is_logged_in()) {
redirect('/cpanel');
}
else
{
redirect('/auth/login');
}
Whether this works depends on the correctness of your functions, but you need to move the
!:The logical
notoperator negates the result of the function call. So you do$this->tank_auth->is_logged_in()and then invert the result.