Replies
- Tosin on January 26, 2024 at 10:23 am in reply to: Buddypress Member types pro photo issue with buddypress profile completion #51547
I using this filter to redirect users to force profile completion
// filter buddypress profile completion redirect url to the (complete-profile) page. add_filter( 'buddypress_profile_completion_redirect', function ( $redirect_url ) { return home_url( '/complete-profile/' ); } );
other codes im using are
// Do not redirect users on user profile and activity directory pages. function buddydev_skip_urls_on_loggedin_user_profile_and_activity_directory_page( $skip ) { if ( bp_is_my_profile() || bp_is_activity_directory() ) { $skip = true; } return $skip; } add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_skip_urls_on_loggedin_user_profile_and_activity_directory_page' ); // Redirect users on members directory pages. function buddydev_skip_urls_on_members_directory( $skip ) { if ( bp_is_members_directory() ) { $skip = false; } return $skip; } add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_skip_urls_on_members_directory' ); // Do not redirect users on non bp pages. function buddydev_skip_redirect_on_non_bp_pages( $skip ) { if ( ! is_buddypress() ) { $skip = true; } return $skip; } add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_skip_redirect_on_non_bp_pages' );
- Tosin on January 25, 2024 at 4:12 pm in reply to: Buddypress Member types pro photo issue with buddypress profile completion #51535
I think there is misunderstanding from start.
My intention is to change the default mystery man avatar based on member type
I enabled the feature to associate custom avatar enabled in the (member types pro) plugin while the (buddypress profile completion) is enabled (user must have profile photo).
THE PROBLEM
Since the default mystery man avatar has been changed buddypress profile completion plugin is no longer forcing members to change their avatar - Tosin on January 17, 2024 at 1:46 pm in reply to: Buddypress Member types pro photo issue with buddypress profile completion #51398
Hello Ravi,
Please note that this issue is not yet resolved, The custom member type photo is not displaying everywhere, it is only showing in the members directory its is not showing in activity and profile pages
Thanks
- 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);