AI Search
Classic Search
Notifications
Clear all
Sep 10, 2020 3:36 am
We use the below plugin to enable Active Directory login integration. Is it possible to have wpforo's login/logout feature use the default WP functions?
https://wordpress.org/plugins/next-active-directory-integration/
2 Replies
Sep 11, 2020 3:35 am
So, I just used JavaScript to re-write the login/logout links. Maybe not the best way, but it works.
<?php
add_action( 'wp_head', function () { ?>
<script>
jQuery(document).ready(function(){
//Rewrite login links
jQuery('a[href*="?foro=signin"]').attr('href', '<?php echo wp_login_url( get_permalink() ); ?>');
//Rewrite logout links
jQuery('a[href*="?foro=logout"]').attr('href', '<?php echo wp_logout_url( get_permalink() ); ?>');
//Remove register links
jQuery('a[href*="?foro=signup"]').remove();
});
</script>
<?php } );