Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

  • DrMosko
    Participant

    @drmosko

    can u give more details pls,

    I tried to edit buddypress\bp-core\bp-core-widgets.php

    line 80

    <?php else : ?>
    
    			<?php do_action( 'bp_before_login_widget_loggedout' ); ?>
    			<?php do_action( 'bp_before_sidebar_login_form' ); ?>
    
    			<form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    				<label for="bp-login-widget-user-login"><?php _e( 'Username', 'buddypress' ); ?></label>
    				<input type="text" name="log" id="bp-login-widget-user-login" class="input" value="" />
    				<br/>
    				<label for="bp-login-widget-user-pass"><?php _e( 'Password', 'buddypress' ); ?></label>
    				<input type="password" name="pwd" id="bp-login-widget-user-pass" class="input" value=""  />
    
    				<div class="forgetmenot"><label><input name="rememberme" type="checkbox" id="bp-login-widget-rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ); ?></label></div>
    
    				<input type="submit" name="wp-submit" id="bp-login-widget-submit" value="<?php _e( 'Log In', 'buddypress' ); ?>" />
    
    				<?php if ( bp_get_signup_allowed() ) : ?>
    
    					<span class="bp-login-widget-register-link"><?php printf( __( '<a href="%s" title="Register for a new account">Register</a>', 'buddypress' ), bp_get_signup_page() ); ?></span>
    
    				<?php endif; ?>

    and no results


    DrMosko
    Participant

    @drmosko

    if a user came from buddypress page and try to connect he is buddypress user for sure ,but if he got to login page from another place he isnt.
    u can see the idea in the func above.
    is there a way to pass all the login warnnings like wrong password to the buddypress page


    DrMosko
    Participant

    @drmosko

    thank u for try to help me, but I ask again,
    I have many needs for diffrent users, one type of users is buddypress, I dont want all my users to connect through front-end, only buddypress users.
    in ur suggestion I will redirect all logins to specific loaction.

    so what I did is :

    //redirect buddypress users login to frontpage 
    function redirect_wp_login_buddypress(){
        global $pagenow;
    	$prev_url = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
    	
    	if ( $prev_url ) {
    		$prev_path = str_replace( home_url(), '', $prev_url );
    		$page = get_page_by_path( $prev_path );
    		}
    	
    	if ( $page->ID == '31' &&	$pagenow == 'wp-login.php') { // buddypress parent page
    		wp_redirect( home_url() . '/?p=31/', 301 );
    		exit();
    		
    	}
    }
    add_action( 'init', 'redirect_wp_login_buddypress' );

    $page->ID == '31' 31 is my buddypress frontend page

    the problem with this is that if user insert incorrect pass or user name, he will not be noticed, also he wont get resend details option,
    can u think of a better way?


    DrMosko
    Participant

    @drmosko

    ok, thx, but how do I redirect only the buddy users?


    DrMosko
    Participant

    @drmosko

    isnt bp_core_redirect for redirect after user login?

Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar