• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Myth:Auth Helper usage

#1
i am testing the Myth:Auth module and i have a issue with the helper "auth"


i use the helper fonction logged_in() in the top banner of my layout template

it work fine in all my pages but in the login page (which is load by the Myth:Auth module) the helper fonction isn't found

"Call to undefined function logged_in()"
Reply

#2
You need to load the helper first. Likely you are doing that in your Controller, in the “helpers” property, but since the login endpoint is actually part of a Myth controller it is not available. It might make sense for the Myth Controllers all to load the helper (you could open an issue on GitHub). In the meantime a quick fix would be to load the helper in your layout: helper(‘auth’)
Reply

#3
Or load it in a BaseController and then extend all your Controllers from the BaseController.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#4
ok  Thx mgatner

InsiteFX: the controller of the login page don't exdend of BaseController because he is inside the Myth:Auth package
Reply

#5
It can still extend from it.

use App\Controllers\BaseController;
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.