redirect on login
-
Hi
How can I use the wpmem_login_redirect filter with different user roles?
I tried:
function my_login_redirect()
{$userid = get_current_user_id();
$user_info = get_userdata($userid);
$user_role = implode(‘, ‘, $user_info->roles);if ($user_role == ‘instructor’)
{
return ‘/hjerteakademiet/?page_id=1930’;
}
else
{
return ‘https://www.vg.no/’;
}
}Any suggestions??
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘redirect on login’ is closed to new replies.