Welcome Guest, Not a member yet? Register   Sign In
Not sure to migrate to CI4
#8

(This post was last modified: 05-14-2020, 08:17 AM by imabot.)

A simple example: some pages are restricted to some users, depending on the user rights. I need to load the page data before checking if the current user is allowed to visit the page. Filters are not great because I have to load and process the page data twice (once in the filter and once in the controller). Redirecting from models / libraries / helpers is no longer possible. So it must be done in controllers. The problem is that my controllers becomes more and more complicated. Even worse, I can't split my code into functions, because redirection in CI4 is based on return, so I can't redirect from a private method in my controller or BaseController. Do you get it?
Reply


Messages In This Thread
Not sure to migrate to CI4 - by imabot - 05-12-2020, 08:11 AM
RE: Not sure to migrate to CI4 - by bivanbi - 05-12-2020, 09:21 PM
RE: Not sure to migrate to CI4 - by imabot - 05-13-2020, 01:52 AM
RE: Not sure to migrate to CI4 - by John_Betong - 05-13-2020, 02:27 AM
RE: Not sure to migrate to CI4 - by imabot - 05-13-2020, 04:12 AM
RE: Not sure to migrate to CI4 - by John_Betong - 05-13-2020, 02:52 PM
RE: Not sure to migrate to CI4 - by admin0 - 05-14-2020, 08:07 AM
RE: Not sure to migrate to CI4 - by imabot - 05-14-2020, 08:13 AM
RE: Not sure to migrate to CI4 - by includebeer - 05-15-2020, 03:05 PM
RE: Not sure to migrate to CI4 - by albertleao - 05-14-2020, 09:37 AM
RE: Not sure to migrate to CI4 - by imabot - 05-18-2020, 02:09 AM
RE: Not sure to migrate to CI4 - by includebeer - 05-18-2020, 04:49 AM
RE: Not sure to migrate to CI4 - by bivanbi - 05-18-2020, 05:19 AM
RE: Not sure to migrate to CI4 - by 68thorby68 - 06-10-2020, 01:25 PM
RE: Not sure to migrate to CI4 - by jreklund - 06-13-2020, 08:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB