BuddyDev

Search

Upon account activation, members are directed to WP login page

  • Participant
    Level: Enlightened
    Posts: 21
    Edward on #21479

    Hi Brajesh,

    On our website, when members register using their email address, they need to activate the account from an email link sent to their address. Once they click on the link and activate the account, they are show a log in hyperlink which unfortunately leads to a WP dashboard (which doesn’t look professional).

    On the website, we have a nice customised login dashboard. How do we direct new members to this customised login rather than the WP dashboard?

    Is there any code we can place in the theme’s function.php?

    Would really appreciate your kind advise.

    Thanks!

    Best regards
    Edward

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #21488

    Hi Edward,
    This should work.

    
    
    /**
     * Redirect to some page on activation.
     */
    add_action( 'bp_core_activated_user', function( $user_id ) {
    	if ( defined( 'DOING_AJAX' ) ) {
    		return;
    	}
    	$url = site_url('/');
    	bp_core_redirect( $url );
    }, 20 );
    

    Please make the change in url to point to the correct page.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 21
    Edward on #21497
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #21508
    This reply has been marked as private.

You must be logged in to reply to this topic.

This topic is: not resolved