Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › BP social connect redirect issue
Tagged: BP Social Connect
- This topic has 5 replies, 2 voices, and was last updated 8 years, 1 month ago by viikka.
Viewing 6 posts - 1 through 6 (of 6 total)
-
AuthorPosts
-
November 20, 2016 at 11:37 pm #80949viikkaParticipantHello, when user register or logs in with FB or google, redirect is to homepage. In configurations, I specified all courses page. When user register/login via normal way, redirect works fine. Do you have a fix for this bug already? Thank you so much.November 21, 2016 at 12:17 pm #81059H.K. LatiyanParticipantYes this is already a known issue with bp social connect plugin. There is no quick fix available for this as of now.November 21, 2016 at 12:33 pm #81064viikkaParticipantIs there any similar plugin which is compatible with the theme? Paid or free doesn't matter. Thanks!November 22, 2016 at 11:08 am #81272H.K. LatiyanParticipantYes you can use any wordpress plugin, there is no compatibility issue with this because login is handled by wordpress not the wplms theme. So any plugin which is compatible with wordpress will work well.November 22, 2016 at 12:06 pm #81309viikkaParticipantOk, so if I use another social login plugin (lets say UserPro), is there a chance that it will redirect to the page I need? Or it will anyway redirect to homepage? Thanks!November 22, 2016 at 3:18 pm #81408viikkaParticipantProblem solve! I kept BP social connect, used this plugin https://wordpress.org/plugins/bp-profile-as-homepage/ But overwrote it like this: */ function bp_profile_homepage() { global $bp; $selected_role = get_option('bpahp_role_choice'); if($selected_role == '') { if(is_user_logged_in() && is_front_page()) { wp_redirect( $bp->loggedin_user->domain.'/dashboard' ); } } else { if(is_user_logged_in()){ if(!current_user_can($selected_role) && is_front_page()) { wp_redirect( $bp->loggedin_user->domain.'/dashboard'); } } } } function logout_redirection() { global $bp; $redirect = $bp->root_domain; wp_logout_url( $redirect ); } function bp_profile_as_homepage_menu() { add_options_page(__('BP Profile as Homepage Settings','bpahp-menu'), __('BP Profile as Homepage Settings','bpahp-menu'), 'manage_options', 'bpahpmenu', 'bpahp_settings_page'); } function bpahp_settings_page() { if (!current_user_can('manage_options')) { wp_die( __('You do not have sufficient permissions to access this page.') ); } $opt_name = 'bpahp_role_choice'; $hidden_field_name = 'bpahp_submit_hidden'; $data_field_name = 'bpahp_role_choice'; $opt_val = get_option($opt_name); if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) { $opt_val = $_POST[ $data_field_name ]; update_option( $opt_name, $opt_val ); ?> <div class="updated"><p><?php _e('settings saved.', 'bpahp-menu' ); ?></p></div> <?php } echo '<div class="wrap">'; echo "<h2>" . __( 'BP Profile as Homepage Settings', 'bpahp-menu' ) . "</h2>"; ?> <p>Using following option, you can disable the redirection for a particular user role.</p> <form name="bpahp-settings-form" method="post" action=""> <input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y"> <p><b>You have selected:</b> <?php if ($opt_val=='') echo 'No One'; else echo $opt_val; ?> <hr /> <?php _e("Who can view Homepage:", 'bpahp-menu' ); ?> <select name="<?php echo $data_field_name; ?>"> <option value="">None</option> <option value="administrator">Administrators</option> <option value="editor">Editors</option> <option value="author">Authors</option> <option value="contributor">Contributors</option> <option value="subscriber">Subscribers</option> </select> </p> <p class="submit"> <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" /> </p> </form>
-
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)
- The topic ‘BP social connect redirect issue’ is closed to new replies.