Plugin Support
Younes
(@vanbom)
Hi @michaelbeil
Upon analyzing the error, it appears that the wp_create_user()
function is unable to successfully create a new user. This issue arises when the addon tries to create a new user while the “Login with Discord on checkout Page” option is active. This feature allows clients to log in using their Discord accounts.
However, instead of returning a user ID, the wp_create_user()
function returns a WP_Error
object. Consequently, this triggers the error within wp_new_user_notification(Object(WP_Error), NULL, ‘xxyyyyyxxyyyy’)
.
- Please verify with the customer if there is a specific configuration in place that restricts the creation of new users. It’s possible that certain settings or security measures are preventing the creation of user accounts.
- Alternatively, the client can disable the “Login with Discord on checkout Page” option within the Advanced Tab. This will deactivate the feature and prevent the addon from attempting to create new users.
I hope this provides a more comprehensive explanation and solution to the issue. Let me know if you need any further assistance.
HI, Just disabled the flags as suggested and got a similar error. There is no security plugin enabled or other restrictions in place.
[21-Jun-2023 14:27:28 UTC] PHP Fatal error: Uncaught Error: Call to undefined method WP_Error::exists() in /home/public_html/wp-includes/user.php:1897
Stack trace:
0 /home/public_html/wp-includes/pluggable.php(2753): clean_user_cache(Object(WP_Error))
1 /home/public_html/wp-content/plugins/wp-user-manager/includes/functions.php(1319): wp_set_password(‘eF._ip^awD/-9Bh…’, Object(WP_Error))
2 /home/public_html/wp-content/plugins/pmpro-discord-add-on/includes/classes/class-discord-api.php(625): wp_new_user_notification(Object(WP_Error), NULL, ‘ry&K89MX!eiu’)
3 /home/public_html/wp-includes/class-wp-hook.php(308): PMPro_Discord_API->ets_pmpro_discord_discord_api_callback(”)
4 /home/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
5 /home/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
6 /home/public_html/wp-settings.php(623): do_action(‘init’)
7 /home/public_html/wp-config.php(88): require_once(‘/home/… in /home/public_html/wp-includes/user.php on line 1897
Plugin Support
Younes
(@vanbom)
Hi @ceteix
Hello, I have conducted two tests using the downloadable version of the plugin, and I did not encounter any issues.
Could you please provide the steps you followed that led to this fatal PHP error?
Hi @michaelbeil @ceteix This could be related to 2 possible things:
- Outdated WP core version
- Or the bot does not have permissions to get discord user email.
- Did you modify this PLUGIN constant
ETS_DISCORD_OAUTH_SCOPES
? It should set to following identify email connections guilds guilds.join gdm.join rpc rpc.notifications.read rpc.voice.read rpc.voice.write rpc.activities.write bot webhook.incoming applications.builds.upload applications.builds.read applications.commands applications.store.update applications.entitlements activities.read activities.write relationships.read
-
This reply was modified 1 year, 10 months ago by
ravisoniets.
Hi
- The WP Core is: 6.2.2
- Not sure how to check that, i suppose it gets the access when the users aproves the discord app connection. (Or the bot does not have permissions to get discord user email.)
- The plugin is not changed or modified, i’m using the latest version.
I’m not sure how to reproduce it. I know it happens on a new user sign-up, and then they connect to discord using the plugin button.
Let me know if i can debug more the plugin or what config to verify. (i’ve disabled bot settings , as per Younes, for user creation and checkout login + disabled any notification/message option for new users)
Best regards
Plugin Support
Younes
(@vanbom)
@ceteix can you please deactivate the wp-user-manager plugin and check again