Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Best practice for accessing Advanced Module Library (ION AUTH) in Frontend

Hi,

I developed an Advanced Module with Ion_Auth 3. It works fine in the backend, and I have access in the frontend via $this->fuel->iauth->logged_in() etc.

What is the best/cleanest way to implement permission checks when I use a mix of opt-in controllers and traditional controllers? Do I deal with permission stuff (redirects etc) in the view/_variables/globals.php file and more granular in the respective view/_variables/my_page.php ? What is your experience/recommendation for this use case?

Comments

  • Since there is not controller to add that logic to before the rendering, the globals.php and the page itself like you suggested would be where to add it.

  • Thanks @admin for the confirmation.

    Since I found a few hints about a separate frontend authentication here in the forum, but nothing really complete, I thought I share my work-in-progress on github, hoping that someone with more detailed knowledge of fuel, can smoothen out some of the edges.

    It's not completely tested (I tried my best with the routes etc), but I was able to add new users in the FUEL backend and login in frontend worked as well.

    I try to fix some bugs in the future, but for now I abandoned the modul in favor of Fuel's internal auth (don't want to reinvent the wheel, but expect more questions about that :)).

    https://github.com/marcus-at-localhorst/FUEL-CMS-Ion-Auth-Module

Sign In or Register to comment.