RBAC with php file

Hello.

So im am following this Guide: http://www.yiiframework.com/wiki/65/how-to-setup-rbac-with-a-php-file/

At the end when i try to login, with a normal user with a role of reader or an admin with the role of admin. I get the same error : Unknown authorization item "admin". (or reader ,depends on the user).

Anyone got an idea?

Ahh fixed the error. The auth.php file should be in the protected/data folder. Still have a problem thought.

I try to test the reader role. Like this:


<?php if(Yii::app()->user->checkAccess('reader')): ?>

<h1> Grats u are a reader </h1>


<?php endif; ?>

This should appear after i log in, but it wont. Any idea?

fixed. Thx to tom[] on live chat. Just needed a litle debugging.