Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Auth::has_access('blog.article') returns true..
  • I enabled Ormauth and
    • created a new user "user01"
    • assigned it to group no. 3 "user"
    • assigned that user to role no. 4 "moderator" by inserting new record into table "users_user_roles"
    • then i have create new permission : area=>blog , permission=>article , description=>desc
    • insert new recode to table "users_role_permissions"
    • in my controller i write this code :

            Auth::logout();
            Auth::login('user01', 'user01');

            if(!Auth::check())
            {
                echo 'please login';
            }
            echo Auth::has_access('blog.article')? 'true' : 'false';

    if i login with superadmin , this shows "true" every time, but with user01 it shows always false, did i have mistake or forgotten thing? maybe condition 'blog.article' is wrong ?


  • HarroHarro
    Accepted Answer
    Did you flush your cache after you made your changes?

    Ormauth caches the users effective rights after calculation to reduce the number of queries needed for every page request.
  • that's it, it works , thank you

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion