Welcome Guest, Not a member yet? Register   Sign In
hook doesn't redirect me
#3

(03-19-2018, 08:28 AM)Narf Wrote: Is that code your actual hook?

If so, hooks are not controllers. You're not supposed to extend CI_Controller for a hook.
Also, `get_instance()` means "get the controller instance", and you're doing that from inside a controller ... the same controller that would be returned by it.

Thanks !

I had to blend in with all the examples I found.
My goal is to check if an entry in my database is at 1 and that we are a "user", to display an info ("site in maintenance") and otherwise continue normally.
AND, if an entry in my database is at 1 and you are "admin" then you can navigate normally.
Maybe my approach isn't optimal.

I don't want to change a file to "hard" to do this but I want to go through an admin interface.

Do you have a design tip? or, is the hook a good idea?

Thanks a lot
M.
Reply


Messages In This Thread
hook doesn't redirect me - by Cognie - 03-19-2018, 05:29 AM
RE: hook doesn't redirect me - by Narf - 03-19-2018, 08:28 AM
RE: hook doesn't redirect me - by Cognie - 03-20-2018, 12:32 AM
RE: hook doesn't redirect me - by InsiteFX - 03-20-2018, 04:18 AM
RE: hook doesn't redirect me - by Cognie - 03-20-2018, 04:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB