I am a trainee now. I am continue doing a a project left by last semester trainee. I found out he did a code as below :
$auth = $this->Auth->User();
if(!empty($auth)) {
$auth['User']['is_admin'] = $this->inGroup('admin');
Can anyone teach me how to avoid this error ? Thank you.