Using shield, How i can redirect to separate url if the user not in admin group |
If I understand well, here is my solution to handle admin and portal namespaces.
Here is before method from my Admin filter: PHP Code: public function before(RequestInterface $request, $arguments = null) And here is before method from my Portal filter: PHP Code: public function before(RequestInterface $request, $arguments = null) As you can see I'm using group customer for my portal users. Here is updated redirects, loginRedirect and registerRedirect methods in Shield auth config. PHP Code: public array $redirects = [ PHP Code: public function loginRedirect(): string PHP Code: public function registerRedirect(): string |
Welcome Guest, Not a member yet? Register Sign In |