myth/auth - Call to undefined function logged_in() |
Hi all,
Migrating from CI3, and I'm having trouble using the helper auth, while in the auth controller. I'm using a navbar with a login form that displays if the user isn't logged in, and this navbar displays on all pages including all of the authentication pages. Call to undefined function logged_in() Code: <?php if (!logged_in()) : ?> I installed myth/auth by composer, migrated all, and then renamed the AuthController to Auth: PHP Code: <?php namespace App\Controllers; In my BaseController I call the auth helper, so I think it 'should' load through each extending controller. Code: <?php
Never mind, I see that other are having the same issue (Myth:Auth Helper usage), so I followed the advise there. Added helper('auth') to my View template, and all is working now.
|
Welcome Guest, Not a member yet? Register Sign In |