Need help with redirecting specific login

I had one of your colleagues help me redirect my Membership subscribers to a specific page. Now that I am considering the Affiliates plugin also, I don’t want my affiliates going to that same page. I have my affiliates doing everything from http://schoolofbookkeeping.com/affiliates. The link there takes them to reg or login and currently still redirects to /enrolled-student-home. I need these and only these folks to end up at /affiliates again. Advice?

Here’s my code currently all in functions.php

/*** HIDE DASHBOARD AND REDIRECT LOGIN TO ESH EDG

****************************************************************/

add_action(‘admin_init’, ‘no_mo_dashboard’:wink:;

function no_mo_dashboard() {

if (!current_user_can(‘manage_options’:wink: && $_SERVER != ‘/wp-admin/admin-ajax.php’:wink: {

wp_redirect( ‘http://schoolofbookkeeping.com/enrolled-student-home’ ); exit;

}

}

/*** REMOVE REMEMBER ME EDG

****************************************************************/

add_action(‘login_head’, ‘remove_remember_me’:wink:;

function remove_remember_me()

{

echo ‘<style type=”text/css”>.forgetmenot { display:none; }</style>’;

}

/*** ADMIN BAR ADMIN ONLY EDG

****************************************************************/

// show admin bar only for admins

if (!current_user_can(‘manage_options’:wink:) {

add_filter(‘show_admin_bar’, ‘__return_false’:wink:;

}

The first one is the key. I’d need something that says “if you are just a lowly affiliate, then go to /affiliates. Is there even a way to determine that? All other users are membership subscribers or a couple of admins if that helps.