Search Results for 'wp user activate'
-
Search Results
-
Hello, I had this code, what it does is that certain users already enter with a subscription and can use the chat without having to pay. When updating to the latest version the code no longer works. Any idea what has changed?:
add_filter(‘bp_get_total_member_count’,’bpfr_hide_get_total_filter’);
function kleo_pmpro_default_level($user_id) {
global $wpdb, $bp;//Change this with your field name
$field_name= “i am”;//Change the field value
$value_to_match = “woman”;//Membership level id
$membership_level = 4;//Done editing
$field_id = $wpdb->get_var( $wpdb->prepare( “SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s”, $field_name ) );
if ($_POST[‘field_’.$field_id] == $value_to_match) {
pmpro_changeMembershipLevel($membership_level, $user_id);
}
}if (is_multisite()) {
add_action( ‘wpmu_activate_user’, ‘kleo_mu_pmpro_default_level’, 10, 4);
} else {
add_action(‘user_register’, ‘kleo_pmpro_default_level’);
}Thanks!
Topic: Unable to register users
I’m trying to troubleshoot my BuddyPress registration form, which seems to be having some serious problems. I should start by noting that I have added some customizations to my form to add additional data fields, but the registration fails regardless of whether the customizations and overrides are enabled or disabled, and fails in exactly the same manner based on the error log, so the customizations are unlikely to be having an impact.
Here are the hooks that I am using to track where the problem is originating from:
// Hook into various stages of the BuddyPress registration process
add_action( ‘bp_before_registration_submit_buttons’, ‘log_before_registration_submit_buttons’ );
add_action( ‘bp_core_screen_signup’, ‘log_core_screen_signup’ );
add_action( ‘bp_signup_pre_validate’, ‘log_signup_pre_validate’ );
add_action( ‘bp_signup_validate’, ‘ex_custom_bp_signup_validate’ );
add_action( ‘bp_core_signup_user’, ‘log_core_signup_user’, 10, 2 );
add_action( ‘bp_core_activate_user’, ‘log_core_activate_user’, 10, 3 );
add_filter( ‘bp_core_validate_user_signup’, ‘log_core_validate_user_signup’ );
add_filter( ‘bp_core_signup_user_notification’, ‘log_core_signup_user_notification’, 10, 2 );function log_before_registration_submit_buttons() {
error_log( ‘Hook: bp_before_registration_submit_buttons fired.’ );
}function log_core_screen_signup() {
error_log( ‘Hook: bp_core_screen_signup fired.’ );
error_log( ‘Form submission data: ‘ . print_r( $_POST, true ) );
}function log_signup_pre_validate() {
error_log( ‘Hook: bp_signup_pre_validate fired.’ );
}function ex_custom_bp_signup_validate() {
global $bp;
error_log( ‘bp_signup_validate hook fired. Validation errors: ‘ . print_r( $bp->signup->errors, true ) );
}function log_core_signup_user( $user_id, $user_data ) {
error_log( ‘Hook: bp_core_signup_user fired.’ );
error_log( ‘User ID: ‘ . $user_id );
error_log( ‘User Data: ‘ . print_r( $user_data, true ) );
}function log_core_activate_user( $user_id, $key, $user ) {
error_log( ‘Hook: bp_core_activate_user fired.’ );
error_log( ‘User ID: ‘ . $user_id );
error_log( ‘Activation Key: ‘ . $key );
error_log( ‘User Data: ‘ . print_r( $user, true ) );
}function log_core_validate_user_signup( $result ) {
error_log( ‘Hook: bp_core_validate_user_signup fired.’ );
error_log( ‘Validation Result: ‘ . print_r( $result, true ) );
return $result;
}function log_core_signup_user_notification( $user_id, $user_data ) {
error_log( ‘Hook: bp_core_signup_user_notification fired.’ );
error_log( ‘User ID: ‘ . $user_id );
error_log( ‘User Data: ‘ . print_r( $user_data, true ) );
return $user_data;
}Here is a sample of the outputs from testing, with and without the Extended Profiles setting turned on:
[19-Jul-2024 00:01:28 UTC] Hook: bp_core_screen_signup fired.
[19-Jul-2024 00:01:28 UTC] Form submission data: Array
(
[signup_username] => TestUserAlpha
[signup_email] => AlphaEmail@EmailAlpha.com
[signup_password] => xEO^ONJS1ZkY
[signup_password_confirm] => xEO^ONJS1ZkY
[field_1] => Imma User
[signup_profile_field_ids] => 1
[signup-privacy-policy-check] => 1
[signup-privacy-policy-accept] => on
[signup_submit] => Complete Sign Up
[_wpnonce] => 3184f10172
[_wp_http_referer] => /register
)[19-Jul-2024 00:01:28 UTC] Hook: bp_before_registration_submit_buttons fired.
[19-Jul-2024 00:01:32 UTC] Hook: bp_core_screen_signup fired.
[19-Jul-2024 00:01:32 UTC] Form submission data: Array
(
[signup_username] => TestUserBeta
[signup_email] => AlphaEmail@EmailAlpha.com
[signup_password] => oeHAfbtPlIRG
[signup_password_confirm] => oeHAfbtPlIRG
[signup-privacy-policy-check] => 1
[signup-privacy-policy-accept] => on
[signup_submit] => Complete Sign Up
[_wpnonce] => 9240fe3ccc
[_wp_http_referer] => /register
)After poking around in various threads and ChatGPT, the suggestion is that the error is happening in the form validation, and I was told to look at bp-core-signup.php in the bp-core folder. Problem: this file does not exist in my BuddyPress installation. I deleted everything, did a fresh installation, and the file still does not exist. I added the hooks back in, made another test, and got exactly the same result. So am I just straight up missing a file in my installation? Or is there a deeper problem that’s outside the scope of my current awareness?
Topic: deactivate sitewide-notice
Hi,
I took over a website as webmaster.
When users login, the see a message on top of the page.
In the source code, I can see, that it is <div id=”sitewide-notice”.
And the table wp_bp_messages_notices is the source of this message.Where in the backend can this message/sitewide-notice be deleted resp. deactivated?
Thx in advance and best regards
MarkusI have inserted this code in bp-custom.php:
<?php
function my_redirect() {
wp_redirect( home_url() );
error_log(‘Hello log’);
exit;
}
add_action( ‘bp_groups_posted_update’, ‘my_redirect’ );
?>Writing is done to the log file, but there is no redirect after a user has posted an update in “Group Activities”. Why not?
As a test, if I use “wp_redirect( ‘https://buddypress.org/’ );” instead of “wp_redirect( home_url() );” and use the action hook “init” instead of “bp_groups_posted_update”, and press F5, I am redirected to https://buddypress.org/.
I use the latest version of WordPress and BuddyPress.
BuddyPress is the only plugin activated.
WordPress is installed in a subdomain.
My issue still happens with themes Twenty Twenty-One, Twenty Twenty-Two, Twenty Twenty-Three and Twenty Twenty-Four.
Hi all,
I am German and ma English is not the best, but I try to discribe my problem as good as possible. But a small warning about my self: I have no idea about coding and I love plug’n’play!My site is : https://pinselcrew.de/
I tried to start a forum with bbpress and buddypress. It worked perfectly together until last week. I got an email from my site that told me about a big problem. The memberlist was empty and the forum was totaly broken. So I asked my hoster for a backup.
When I startet the debug mode, it told me that there is an error in the bbpress code that points to buddypress. After I deactivatet BuddyPress everything was fine again. So I deinstalled and installed it again. But the error is the same.Maybe aomeone has an idea. The first members really loved BuddyPress and now the miss it!
Best regards from Hamburg
Markus
__________________________________________________
This is the mail I received:Aktives Theme: Astra (Version 4.6.3)
Aktuelles Plugin: bbPress (Version 2.6.9) PHP-Version 7.4.33 Fehler-Details ============== Ein Fehler vom Typ E_ERROR wurde in der Zeile 229 der Datei /www/htdocs/w01d4e65/pinselcrew.de/wp-content/plugins/bbpress/includes/extend/buddypress/members.php verursacht. Fehlermeldung: Uncaught Error: Call to undefined function bp_core_get_user_domain() in /www/htdocs/w01d4e65/pinselcrew.de/wp-content/plugins/bbpress/includes/extend/buddypress/members.php:229
Stack trace:
#0 /www/htdocs/w01d4e65/pinselcrew.de/wp-content/plugins/bbpress/includes/extend/buddypress/members.php(100): BBP_BuddyPress_Members->get_profile_url(131)
#1 /www/htdocs/w01d4e65/pinselcrew.de/wp-includes/class-wp-hook.php(324): BBP_BuddyPress_Members->get_user_profile_url(131)
#2 /www/htdocs/w01d4e65/pinselcrew.de/wp-includes/plugin.php(205): WP_Hook->apply_filters(131, Array)
#3 /www/htdocs/w01d4e65/pinselcrew.de/wp-content/plugins/bbpress/includes/core/abstraction.php(471): apply_filters(‘bbp_pre_get_use…’, 131)
#4 /www/htdocs/w01d4e65/pinselcrew.de/wp-content/plugins/bbpress/includes/users/template.php(560): bbp_maybe_intercept(‘bbp_pre_get_use…’, Array)
#5 /www/htdocs/w01d4e65/pinselcrew.de/wp-content/plugins/bbpress/includes/admin/users.php(260): bbp_get_user_profile_url(131)
#6 /www/htdocs/w01d4e65/pinselcrew.deHello. When I click on the name of another user in our Forum, it currently redirects us to an account restricted page and not their profile. I have been checking BP settings but I do not see any setting to unrestrict it at the moment,
I am new to WP in general but I do think that viewing other profiles should be possible. Not sure if there is a setting somewhere that will allow this function. As mentioned, the users are clickable right now but when I do click it, it redirects me to a restricted access page.
We are using Version 12.0.0
Link to our forums: https://parentingourparents.info/forum/Here are the plugins currently activated:
Avada Builder
Avada Core
Basic User Avatars
bbPress
BetterDocs
BetterDocs Pro
BuddyPress
Classic Widgets
CoBlocks
Elementor
Google Analytics
Paid Memberships Pro
Paid Memberships Pro – bbPress Add On
Paid Memberships Pro – BuddyPress & BuddyBoss Add On
Paid Memberships Pro – Donations
Sucuri Security – Auditing, Malware Scanner and Hardening
User Menus
WP User Profile Avatar
WPForms LiteHi
I’ve having an issue when users try to register on the site. They get an error message telling them there is a critical error on this website. I have de-activated all the plugins as suggested and nothing seems to work. I checked the error logs and this is what comes up but I don’t understand any of it. Can anyone shed some light on what to do please? My website is mylocalcommunity.orgFatal error: Uncaught Error: Call to undefined function PHPMailer\PHPMailer\mail() in /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/PHPMailer/PHPMailer.php:874 Stack trace: #0 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/PHPMailer/PHPMailer.php(1961): PHPMailer\PHPMailer\PHPMailer->mailPassthru() #1 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/PHPMailer/PHPMailer.php(1682): PHPMailer\PHPMailer\PHPMailer->mailSend() #2 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/PHPMailer/PHPMailer.php(1518): PHPMailer\PHPMailer\PHPMailer->postSend() #3 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-content/plugins/buddypress/bp-core/classes/class-bp-phpmailer.php(136): PHPMailer\PHPMailer\PHPMailer->send() #4 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-content/plugins/buddypress/bp-core/bp-core-functions.php(3747): BP_PHPMailer->bp_email() #5 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-content/plugins/buddypress/bp-members/bp-members-functions.php(2390): bp_send_email() #6 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-content/plugins/buddypress/bp-members/bp-members-functions.php(1948): bp_core_signup_send_validation_email() #7 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-content/plugins/buddypress/bp-members/screens/register.php(263): bp_core_signup_user() #8 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/class-wp-hook.php(310): bp_core_screen_signup() #9 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() #10 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #11 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(388): do_action() #12 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/class-wp-hook.php(310): bp_screens() #13 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() #14 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #15 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(445): do_action() #16 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/class-wp-hook.php(310): bp_template_redirect() #17 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() #18 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action() #19 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/template-loader.php(13): do_action() #20 /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-blog-header.php(19): require_once(‘…’) #21 /var/www/vhosts/mylocalcommunity.org/httpdocs/index.php(17): require(‘…’) #22 {main} thrown in /var/www/vhosts/mylocalcommunity.org/httpdocs/wp-includes/PHPMailer/PHPMailer.php on line 874
There has been a critical error on this website.I would like to redirect all the pages to /wp-login.php except the login page, register page and activate/{activation-string}. I have a problem with the activate/{activation-string}, it goes to the wp-login.php, it should not redirect there.
Sample activation link after registration:
https://mysite.com/activate/NqAFdBGuET5WqTSS7zqlkL0DUyDYMOdF/ -> should not redirect to wp-login.phpThis is my current code
function not_logged_in_redirect() {
if (!is_user_logged_in()) {
if (!(is_page(‘login’) || is_page(‘register’)) && !(is_page() && preg_match(‘/^activate\/[a-zA-Z0-9]+$/’, get_query_var(‘activate’)))) {
wp_redirect(wp_login_url());
exit;
}
}
}
add_action(‘template_redirect’, ‘not_logged_in_redirect’);Out of about 6000 members, we have around 1000 who have no entry with the type
last_activityin thewp_bp_activitytable.I think some will be simply members who have yet to log in, but it doesn’t seem to be all of them.
For instance, if I search the data for members who have no
last_activitybut do have an entry with typeupdated_profile, I find over 700 members.As far as I can tell, the function
bp_core_record_activity()is hooked towp_head, and should be updatinglast_activityevery 5 minutes.There being no
last_activitydefinitely seems to be a bug of some kind. If I edit the Extended Profile in admin of a member with nolast_activity, ‘Last active’ in the ‘Member’s stats’ box shows the current date/time. This seems to be because in\BP_Members_Admin::user_admin_stats_metabox(), the account is activated (so$last_activedoesn’t get assigned the registration date), butbp_get_user_last_activity()returns nothing. Sostrtotime( $last_active )returns the current date/time.Any ideas as to how this might have happened?
I wondered about the ‘Repair member “last activity” data’ option under Tools > BuddyPress, but I ran this on my local installation and it doubled the number of members without
last_activity, so I’m not sure what that’s about.Hello,
Setup:
WP version 6.2,
BP version 11.1.0,
PHP version 7.4I want an activation mail setup during the registration process, as the site needs a double-opt-in for the registration of new users.
the problem is as follows:
- A user registers
- An email is sent to the admin, that a user registered
- BUT the promised activation email to the user does not get sent.
as I thought this might be a common problem, of course I have done some research and found no fitting solution, as the mails in general do work, what the solutions claim to fix.
I have also done excessive testing.
I found no cause/solution and so I supect a BP/WP bug or misconfiguration I did not find.
I confirmed via MailHog and the “Post SMTP” plugin that the mail does not get sent at all, but other mails get sent. So from my point of view there is NO Problem with SMTP or mail sending in general.
When I reject the user in the confirmation process, then a mail gets sent to the user.
I have checked the Mail-Templates of BP, repaired them twice and checked for the trigger “Der Empfänger hat sich registriert”, in english: The recipient has registered”.
All this happens on the local and the production server.I deactivated as much other plugins as possible to exclude them as source of the error.
Everything seems to be fine. But the Email does not get sent. I am totally stuck.
Can someone help?
E.g. confirm the activation mail gets sent/not sent?Hello Team,
Whenever any user registers on the website, they get a welcome email from BuddyPress. I want to disable that default welcome email. I’ve tried using plugins and some custom code but the problem was not solved. Is there any way to deactivate that email? The code I tried was:
“add_filter(‘wpmu_welcome_notification’, ‘__return_false’ );”
Looking for help
Thank you
