Replies
- Tosin on January 15, 2024 at 9:45 am in reply to: Buddypress Member types pro photo issue with buddypress profile completion #51379
Thanks Ravi
I hope this can be resolved soonest as new members on my site arent uploading new profile photos
Regards
- Tosin on January 11, 2024 at 11:15 am in reply to: Buddypress Member types pro photo issue with buddypress profile completion #51356
Hello Ravi
The code did not work, the code you provided removed the profile photos I set for the member types. I dont want the custom profile photos to be removed but I want the saved membertype profile photo to be compatible and work along side the buddypress profile completion plugin.
- Tosin on January 10, 2024 at 6:55 am in reply to: Buddypress Member types pro photo issue with buddypress profile completion #51335
Gentle reminder sir thanks
I really love this idea and its also been on my mind for long now, since I didnt know if this was possible I just decided to stick with the buddypress featured members plugin.
I would be awesome if there is an option to also make featured members sticky
- Tosin on January 9, 2024 at 11:16 am in reply to: [Resolved] Getting started / hide the @username #51318
Hi apologies for the confusion I meant (Disable
Activity Streams) feature. The @username feature is enabled when the Activity Streams feature is enabled - Tosin on January 9, 2024 at 2:58 am in reply to: [Resolved] Getting started / hide the @username #51308
There are various options depending if you want to partially diasable @mentions or completely disable it.
1.
add_filter( 'bp_activity_do_mentions', '__return_false' );
2. Removes mentions pane from profile activity (doesn’t remove mention functionality)
function remove_mention_nav() { global $bp; bp_core_remove_subnav_item( $bp->activity->slug, 'mentions' ); } add_action( 'bp_setup_nav', 'remove_mention_nav', 15 );
3.Just hide with css
/* Hide username in BuddyPress profile header */ #item-header .username { display: none; }
4. Just disable public message feature in buddypress settings
- Tosin on January 8, 2024 at 2:08 pm in reply to: [Resolved] Getting started / hide the @username #51305
Hi
Regarding the security issue I think you don’t need to hide the username, you can disable login by username and enable login by only email. Email addresses arent publicly displayed there by improving login security. I was able to achieve this with the code below.
// Function to log in with email instead of username function use_email_for_login($user, $username, $password) { if (!empty($username) && !empty($password)) { // Check if the entered username is an email if (is_email($username)) { // Get the user by email $user = get_user_by('email', $username); if (!$user) { // Email not found, return an error return new WP_Error('invalid_email', __('Invalid email or password.')); } else { // Authenticate the user with the retrieved username $username = $user->user_login; $user = wp_authenticate_username_password(null, $username, $password); if (is_wp_error($user)) { // Authentication failed, return an error return new WP_Error('invalid_login', __('Invalid email or password.')); } } } else { // If the entered username is not an email, return an error return new WP_Error('invalid_email_format', __('Invalid email or password.')); } } return $user; } add_filter('authenticate', 'use_email_for_login', 20, 3);
- Tosin on January 3, 2024 at 9:40 am in reply to: [Resolved] Buddypress xprofile visibility option (For Buddypress follow plugin) #51271
Thank you Ravi,
This code below worked for me
function custom_modify_visibility_levels($allowed_visibilities) { // Add a new visibility level for 'My Followers' if (function_exists('bp_follow_is_following')) { $allowed_visibilities['followers'] = array( 'id' => 'followers', 'label' => __('My Followers', 'buddypress') ); } return $allowed_visibilities; } add_filter('bp_xprofile_get_visibility_levels', 'custom_modify_visibility_levels'); // Adjust visibility based on followers function custom_get_hidden_visibility_types_for_user($hidden_levels, $displayed_user_id, $current_user_id) { if ($displayed_user_id != $current_user_id && !bp_follow_is_following(array('leader_id' => $displayed_user_id, 'follower_id' => $current_user_id)) && !is_super_admin()) { $hidden_levels[] = 'followers'; // Hide profile field with 'My Followers' visibility level for the user } return $hidden_levels; } add_filter('bp_xprofile_get_hidden_field_types_for_user', 'custom_get_hidden_visibility_types_for_user', 10, 3);
- Tosin on January 2, 2024 at 4:33 pm in reply to: [Resolved] BuddyPress Profile Visibility Manager (follow support) #51264
Thanks Ravi
The code worked perfectly
- Tosin on December 23, 2023 at 3:26 pm in reply to: [Resolved] Buddyblog pro and buddypress 12.0.0 beta 1 #51214
This is now resolved it was a caching issue
Thanks