Skip to:
Content
Pages
Categories
Search
Top
Bottom

Registration process

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

  • Venutius
    Moderator

    @venutius

    Try using the Buddypress Registration Options plug in, I use this and it sends me an email once when they first register and then another once they have activated their account.


    URTU Learning
    Participant

    @urtu-learning

    Hi

    thank you I will try this, do you know where about I would set the landing page. At present when a user logs in, it takes them to their dashboard but I would like it to take them to the home page.

    Thanks


    Rimon Habib
    Participant

    @rimon_habib

    If you want to redirect all users(admin,subscriber,all roles) to homepage after login, just use this line at your theme functions.php file

    add_filter( 'login_redirect', create_function( '$url,$query,$user', 'return home_url();' ), 30, 3 );

    Or if you filter a bit, like Admin users will redirected to dashboard, and all others to home page, you can place this code instead of that

    
    function wp_bp_custom_login_redirect( $redirect_to, $request, $user ) {
    	global $user;
    	if ( isset( $user->roles ) && is_array( $user->roles ) ) {
    		if ( in_array( 'administrator', $user->roles ) ) {
    			return $redirect_to;
    		} else {
    			return home_url();
    		}
    	} else {
    		return $redirect_to;
    	}
    }
    
    add_filter( 'login_redirect', 'wp_bp_custom_login_redirect', 30, 3 );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Registration process’ is closed to new replies.
Skip to toolbar