In UserIdentity, I have this statement:
$this->setState(‘user_company_id’, $user->company_id);
This is so I can restrict the user to only seeing table rows that have the company_id they
are currently set for (at login).
But I want to be able to change that setState value without requireing a logout/login
In my UserController, after the ->save I’l like to run that setState statement right there,
to update the new company_id I just changed, but I don’t know the correct syntax to do that.
I know that ‘$this->setState(‘user_company_id’, $user->company_id);’ doesn’t work in UserCOntroller.
Can anyone help me?