Peter's redirect plugin custom rule

Can somebody help me extend Peter’s redirect plugin (https://wordpress.org/plugins/peters-login-redirect/) to setup a custom login redirect rule. I want to redirect all users who are participants in a given forum to the corresponding forum homepage.

Below is an example from the plugin website to setup a custom rule based on source IP. (https://wordpress.org/plugins/peters-login-redirect/other_notes/)

function redirectByIP( $custom_redirect_to, $redirect_to, $requested_redirect_to, $user )

{

$ip_check = ‘192.168.0’;

if( 0 === strpos( $_SERVER, $ip_check ) )

{

return ‘/secret_area’;

}

else

{

return $custom_redirect_to;

}

}

add_filter( ‘rul_before_user’, ‘redirectByIP’, 10, 4 );

Thanks

Shireen