AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Solved] Use WP login form ... not wpforo's

3 Posts
2 Users
1 Reactions
900 Views
Posts: 6
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@fredclown)
Active Member
Joined: 6 years ago
[#14612]

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
Posts: 6
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@fredclown)
Active Member
Joined: 6 years ago

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 } );

1 Reply
Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@fredclown,

I'll suggest you check the following topic, it may help you: https://wpforo.com/community/how-to-and-troubleshooting-2/which-files-contain-log-in-register-modal-code/

Besides, please read this changelog: https://wpforo.com/community/how-to-and-troubleshooting-2/which-files-contain-log-in-register-modal-code/


Share: