-
Author
-
May 3, 2015 at 22:09 #57143clayfaithParticipant
Hi
I want users to be redirected to the Activity page on login. However, the Facebook login keeps them on the same page. I have used the following in my child theme:
COPY CODEfunction kleo_ajax_login() { // Check the nonce, if it fails the function will break check_ajax_referer( 'kleo-ajax-login-nonce', 'security' ); // Nonce is checked, get the POST data and sign in user $info = array(); $info['user_login'] = $_POST['log']; $info['user_password'] = $_POST['pwd']; $info['remember'] = (isset( $_POST['remember'] ) && $_POST['remember'] === true) ? true : false ; $info = apply_filters('kleo_ajaxlogin_atts', $info); $user_signon = wp_signon( $info, false ); if ( is_wp_error( $user_signon ) ){ $error_msg = $user_signon->get_error_message(); echo json_encode(array( 'loggedin' => false, 'message' => '<span class="wrong-response"><i class="icon icon-attention"></i> ' . $error_msg . '</span>' )); //echo json_encode(array( 'loggedin' => false, 'message' => '<span class="wrong-response"><i class="icon icon-attention"></i> ' . __( 'Wrong username or password. Please try again.', 'kleo_framework' ) . '</span>' )); } else { if ( sq_option( 'login_redirect' , 'default' ) == 'reload' ) { $redirecturl = apply_filters( 'kleo_modal_login_redirect', '/activity/', '', $user_signon ); } else { $redirecturl = apply_filters( 'login_redirect', '', '', $user_signon ); } echo json_encode(array('loggedin'=>true, 'redirecturl' => $redirecturl, 'message'=> '<span class="good-response"><i class="icon icon-ok-circled"></i> ' . __( 'Login successful, redirecting...','kleo_framework' ) . '</span>' )); } die(); }
I have also checked “reload current page” in the Misc tab under settings. I tried using the Peter’s Redirect plugin, but to no benefit.
The weird thing is even if I login from another page, it directs me to the Home page instead of the Activity page.
I have done everything in my knowledge to fix this. Now it’s your turn.
Thanks!
May 4, 2015 at 14:42 #57178clayfaithParticipantHello Seventhqueen
Please reply to the above query.
Thanks
May 4, 2015 at 19:37 #57256clayfaithParticipantHi
Why am I not getting any reply for this question? Is this some kind of permanent bug with the theme?
Please reply.
May 4, 2015 at 20:05 #57260sharmstrModeratorRead the bottom of this: http://sharmstr.com/login-redirect/
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
May 4, 2015 at 20:36 #57264AbeKeymasterHi, the facebook redirect now just refreshes the page but we will be releasing an update around 15th this month to include the redirect logic to Facebook too
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.May 7, 2015 at 20:38 #57786sharmstrModeratorIts already been added. Make sure you to delete the custom code after the update.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
May 25, 2015 at 23:53 #60115btritesParticipantHi.. I am just checking in on the status of this update. Do you know when the re-direct will be available?
Thanks!May 26, 2015 at 01:02 #60119sharmstrModeratorAny day now.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.