(02-20-2015, 04:00 PM)tom365 Wrote: I have a base controller, and in it I am loading the user model. If the model has some certain flags active, I want to change the action.
e.g. User is visiting forum/thread means forum controller and thread action. But in the user model, the "is_locked" flag has value "1", so I want the CI to use the "account" controller and "locked" action, but I don't want the page to redirect to account/locked.
By definition, what you have asked for is a redirect
I infer that you want to carry out some action that is held in the account->locked() function; This may indicate that you do not have the separation of concerns correct between controllers and models.
Can you showus the code that you are wanting to call in the other controller and we may be able to help you refactor it