Replies
- Brajesh Singh on February 9, 2022 at 4:35 am in reply to: [Resolved] Suspended users able to access information through API if already logged in #43094
Hi Nifty,
Thank you.that will certainly help.
Regards
Brajesh - This reply has been marked as private.
You are welcome.
You can use both of them if you want to.In case you used the 2nd code, the message on update profile page will be “There was a problem updating some of your profile information. Please try again.” That’s a bit misleading.
Regards
Brajesh- Brajesh Singh on February 9, 2022 at 4:28 am in reply to: Can somebody help me with this snippet code? #43091
Hi,
Welcome to BuddyDev.Thank you for the question. It’s an interesting question.
In order to achieve the delayed message, we need to maintain a queue of message and replay it after 5 mins of registration.
WordPress does not offer native queue ability, so we will need to manage a custom queue and use the cron functionality of WordPress to achieve it.
To be honest, It changes from couple of lines to a bit more.
I am asking one my colleagues to put the code as a simple one page plugin for you. we will link you to the plugin in next couple of days.
PS:- I and my team sincerely appreciate your feeling. Thank you for joining BuddyDev. We will appreciate if you change the display name as it may confuse people.
Thank you
Brajesh Hi Olandir,
Thank you for the question.
Here is the code to do thatadd_action( 'bp_signup_validate', function () { $disallowde_names = array( "admin", "me" ); if ( ! isset( $_POST['field_1'] ) ) { return; } if ( in_array( $_POST['field_1'], $disallowde_names ) ) { buddypress()->signup->errors['field_1'] = __( 'Sorry, this name is not allowed!' ); } } );Please update the disallowed list with the names.
Please do understand that it does not prevent the users form changing the name after registration to one of the disallowed ones.
PS:- My colleague @ravisharma proposed another alternative code which works for update as well as registration(Here is his code)
add_filter( 'bp_xprofile_set_field_data_pre_save', function ( $save, $field_args ) { $field = $field_args['field']; $value = $field_args['value']; // Not name field. if ( $field->id != 1 ) { return $save; } $restricted_names = array( 'admin', 'moderator' ); if ( in_array( $value, $restricted_names ) ) { $error_message = __( 'Name is restricted. Please try different name' ); add_action( 'bp_field_' . $field->id . '_errors', function () use ( $error_message ) { echo esc_html( $error_message ); } ); return new WP_Error( $error_message ); } return $save; },10, 3 );The problem is it does not show the error to the user.
Regards
Brajesh- Brajesh Singh on February 9, 2022 at 3:47 am in reply to: [Resolved] Feeds needed for Member Activities to function. #43087
Hi David,
Yes, template overrides can cause it.Please try disabling on your current theme and switching to a different theme to check it that makes the BuddyPress comments load properly.
Regards
Brajesh - Brajesh Singh on February 9, 2022 at 3:45 am in reply to: What occurs when User Deletes a Comment in Moderation #43086
Hi Debbie,
I am sorry. That would be 1.4.7 not 1.4.8.Please try 1.4.7
Regards
Brajesh - Brajesh Singh on February 9, 2022 at 3:44 am in reply to: BuddyPress Notify Post Author on Blog Comment – Custom email content #43085
Hi Anthony,
Welcome to BuddyDev.Theplugin does not notify via mail. It notifies users via BuddyPress notification system.
https://github.com/buddydev/bp-notify-post-author-on-blog-comment/blob/master/bp-blog-comment-notifier.php#L345You can add wp_mail() there to notify to the author if needed using mail.
https://developer.wordpress.org/reference/functions/wp_mail/
Regards
Brajesh 1. You have 2 forms on registration as you are using the login form/some filters in the righ sidebar. You can make the registre page single column(Dashboard->Pages->register, edit and set the layout to single column) and only registration form will be visible.
2. It is not possible to change the cover photo of the profile:-
Please share a guest account to test it. Are you getting some error?3. You can use a plugin to rename wp-login.php to login ro anything. There are many plguins available for the same.
Here are some exmaples.
https://wordpress.org/plugins/wps-hide-login/
https://wordpress.org/plugins/rename-wp-login/Regards
BrajeshHi James,
Thank you for reporting.The problem is BuddyBoss uses javascript for buttons and injects the buttons if you use their loop. But they do not activate the js bindings for message/follow outside the default components. That breaks it. We had similar issue for messages button using BuddyBoss.
I am requesting my team to look into it and see if there is a way to override this behaviour and update the plugin or add css to hide the button.
Regards
Brajesh