Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Auth::has_access() on multiple drivers
  • I've got multiple drivers and checking has_access() on one driver. I use: Auth::instance('Simpleauth')->has_access('posts.create', 'Simpleacl') to check. Otherwise Auth checks both drivers, and could potentially return false positives (if the user-roles and access rules are similar).

    Just wanted to check if this was the best way to go about this.


  • The mutliple driver design was meant to be a system for mutliple auth backends.

    If will only check drivers that are in a logged-in state, so it your user is authenticated by your second driver, the has_access() method of your first driver will return false immediately, due to a missing user.

    This is how simpleauth/ormauth work, I can say anything about your own custom driver, but it should work this way too.

Howdy, Stranger!

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

In this Discussion