Login adhérent

Home/Login adhérent
Login adhérent 2016-12-14T09:43:25+01:00
[insert_php]

require (‘wp-includes/pluggable.php’);

$current_user = wp_get_current_user();

if (in_array(‘adherent’, $current_user->roles)) {
if (get_user_meta($current_user->id, ‘wpcf-actif’, true) == «  ») {
$login_url = ‘/adherent-inactif.html’;
wp_logout();
}
else {
$login_url = ‘/annuaire-adherents.html’;
}
wp_redirect($login_url);
}

[/insert_php]