Replies
Hello Tosin,
Please download the latest version of plugin and use the following code.
add_filter( 'wp_authenticate_user', function( $user ) { if ( isset( $_POST['log'] ) && ! is_email( $_POST['log'] ) ) { return new WP_Error( 'invalid_email' ); } return $user; }, 10 );It will only allow login by email address.
Regards
RaviHello Tosin,
We have updated the plugin. Please download the latest version of it. Now it will support Limit Login Attempts Reloaded and show message thrown by this plugin.
Regards
Ravi- Ravi on June 10, 2019 at 12:22 pm in reply to: [Resolved] BP (un-)lock activity for admin only? #23453
Hello Richard,
Thank you for the acknowledgement.
Regards
Ravi - Ravi on June 10, 2019 at 9:22 am in reply to: [Resolved] BP (un-)lock activity for admin only? #23449
Hello Richard,
Please download the latest version of plugin “BuddyPress Lock UnLock Activity” and use the following code which allows only site admins can lock and unlock an activity.
/** * Only allow site admins to lock and unlock activity * * @param bool $can True or false. * * @return bool */ function buddydev_user_can_lock_unlock_activity( $can ) { return is_super_admin(); } add_filter( 'bp_lock_unlock_user_can_update_activity', 'buddydev_user_can_lock_unlock_activity' );You can put this code in “bp-custom.php” or active theme “functions.php” file. Please let me know if it works or not.
Regards
Ravi Hello Tosin,
I am glad that you found the culprit causing the issue. Regarding the support we will check and get back to you next weak.
Regards
Ravi- Ravi on June 6, 2019 at 4:41 am in reply to: [Resolved] Remove 'add friend' button for member type (admins) #23378
Thank for the acknowledgement.
Regards
Ravi - This reply has been marked as private.
Hello tosin,
Thank you for detailed acknowledgement. It seems you have not removed the following custom code i.e. You have provided in the following reply.
https://buddydev.com/support/forums/topic/branded-login-support/#post-23259
Because form still redirecting with ‘?login=failed’ and causing not to show error messages. Please check and let me know.
Regards
Ravi- Ravi on June 3, 2019 at 4:18 am in reply to: [Resolved] Remove 'add friend' button for member type (admins) #23285
Hello Kristian,
Remove all previous code and Try the following code based on user ids.
function buddydev_hide_add_friend_button( $button ) { $user_id = bp_is_user() ? bp_displayed_user_id() : bp_get_member_user_id(); $excluded_user_ids = array( 340 ); // Enter comma separated list of ids you want to exclude. if ( in_array( $user_id, $excluded_user_ids ) ) { $button = ''; } return $button; } add_filter( 'bp_get_add_friend_button', 'buddydev_hide_add_friend_button' );Regards
Ravi Hello Tosin,
Please the above code and check weather form is submitting to login page created by BuddyPress Branded Login plugin. If not please make sure Login form “action attribute” should be like the followin one:
<form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">Please check and let me know. Also to make check box checked. Search and replace like following:
Search for
<input name="rememberme" type="checkbox" id="rememberme" value="forever" <?php checked( $remember_me ); ?> />Replace with
<input name="rememberme" type="checkbox" id="rememberme" value="forever" checked/>Regards
Ravi- This reply was modified 7 years, 5 months ago by
Ravi.
- This reply was modified 7 years, 5 months ago by