-
Author
-
July 17, 2014 at 01:09 #22793AdamParticipant
I’ve been reading around the login redirect questions but don’t see anything quite like what I’m after.
PMPro is screwing with our redirect behavior. We *don’t want to redirect to the levels page* for users who log-in and do not yet have membership.
When user logs in:
if admin, redirect to wp-admin
if user and no membership level, refresh current pageThis is because we’re launching PMpro without any restrictions, at first. We’ve disabled all restrictions and the Levels page does not display unless directly accessed OR when non-members log in (this is the problem..)
July 17, 2014 at 01:37 #22794AdamParticipantHere’s a modified snippet of something else I found here which seems to be working
/* Filter the redirect url for login*/
add_filter("login_redirect","my_login_redirect",100,3);function my_login_redirect($redirect_to_calculated,$redirect_url_specified,$user){
if(!is_super_admin($user->ID)) {
/* EMPTY = refresh current page?? */
}
else {
return $redirect_to_calculated; /*if site admin*/
}
}
The point here is that filtering kleo_pmpro_url_redirect didn't work at all for me. Only filtering login_redirect (with priority) works, and returning nothing for the regular user case apparently means 'reload current page'.
Like I said seems to be working so far.
We needed this because we're turning on PMpro with no restrictions, and only allowing sign-ups from people with direct access. We don't want the levels page popping up automatically on logging in.
July 23, 2014 at 12:49 #23298CatalinModeratorHello,
Please take a look at this link:
https://wordpress.org/plugins/peters-login-redirect/
Thank you,
CatalinHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 31, 2014 at 21:08 #27205cybercliParticipantThis plugin does not help, subscribers still directed to home page. How can I send subscribers to their profile page instead?
Thanks
September 2, 2014 at 12:39 #27295CatalinModeratorHello,
Have you tried this:
https://archived.seventhqueen.com/forums/topic/redirect-user-to-their-profile-after-login
Thank you,
CatalinHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.