How to redirect non admin user after login
I have a custom user role on the site. I also have a login hook to redirect users to the home page. When an admin/editor logs in this works fine (although ultimately I would like them to redirect to the dashboard).
When a member of the custom user role logs in they get redirected to a 404. The admin/editor users get the editor frame around the page, so I assume what is happening is that when it tries to apply this for my custom role it finds that the user doesn’t have rights to view the editor frame and so passes them on to a 404.
How do I get the users in my custom role to redirect to the normal (editorless) version of the page?
Leave an answer