Skip to:
Content
Pages
Categories
Search
Top
Bottom

Redirection Issue regarding activation

Viewing 1 replies (of 1 total)
  • @ankurm

    Member

    I found a way to accomplish it…
    Paste this piece of code in your theme functions file..

    `// Stop user accounts logging in that have not been activated (user_status = 2)
    function bp_core_signup_disable_inactive_modified( $auth_obj, $username ) {
    global $bp, $wpdb;

    if ( !$user_id = bp_core_get_userid( $username ) )
    return $auth_obj;

    $user_status = (int) $wpdb->get_var( $wpdb->prepare( “SELECT user_status FROM $wpdb->users WHERE ID = %d”, $user_id ) );

    if ( 2 == $user_status )
    header(“Location:”.get_site_url().”/login?err=not-activated”); /*Your Custom Message*/
    else
    return $auth_obj;
    }
    add_filter( ‘authenticate’, ‘bp_core_signup_disable_inactive_modified’, 30, 2 );
    `

Viewing 1 replies (of 1 total)
  • The topic ‘Redirection Issue regarding activation’ is closed to new replies.
Skip to toolbar