after login that will redirect user role into a page
OK, so your first problem is that $current_user->roles is an array and not a string, so your condition won’t be true 😉 My another concern would be the hook you’re using. Some plugins may use it for other purposes, and killing the script can be harmful. And… there is much better hook for this 😉 … Read more