Opened 8 years ago
Closed 7 years ago
#7454 closed defect (bug) (no action required)
User in DB (status 2) but not showing in Admin
Reported by: | Maniou | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Members | Keywords: | |
Cc: |
Description
Hi,
Since the last maj (2.8.1), I've got users in my database with their data in the tables wp_users and wp_usermeta but they are not showing anywhere in the wordpress admin user (or the pending user page - users.php?page=bp-signups).
In the DB, for thoses users :
- In wp_users the user_statuts is set to '2' and they don't have any user_activation_key.
- They don't have any data related to them in wp_signups (that's why they don't show up on (users.php?page=bp-signups).
Looking the username of thoses users I'm 100% sur it's spam, but i can't understand how they can populate users in the table wp_users and wp_usermeta but nothing in wp_signups.
Thank you for your help !
Change History (5)
#2
@
8 years ago
Hello @johnjamesjacoby,
Thank you for your answer,
On my setup, what I can see is that users with a user_status
of 2 are users who need to click on the link from the activation mail in order to be activated.
Here more details about the problem :
- The user i'm talking about (thoses with no entry in
wp_signups
) have auser_registered
date very recent (< 3 days). - Looking my SMTP server I know an activation mail was sent to them.
- Also they have data in
wp_bp_xprofile_data
. - I know they are spam because how they are named.
I can use bp_members_migrate_signups()
to create them an entry in wp_signups
but i'm still having new users added without entry in wp_signups
.
I still don't understand how they can register without having entry in wp_signups :(
For the moment I've just added the google captcha to prevent new users like them to register, still don't know if it's working.
Thank you !
#3
@
8 years ago
As JJJ has stated, BuddyPress 2.0 has moved to the same signups system that powers WordPress multisite.
For backward compatibility, we still create users with user_status = 2
:
https://buddypress.trac.wordpress.org/browser/tags/2.8.1/src/bp-members/bp-members-functions.php?marks=1840-1861#L1840
However, their user activation key should be set according to the code block linked to above. So, it's a bit interesting why you do not see an associated activation key for those users.
If you want to disable the creation of these users entirely, add the following to wp-content/plugins/bp-custom.php
:
define( 'BP_SIGNUPS_SKIP_USER_CREATION', true );
#4
@
8 years ago
Thanks @r-a-y
It's very clear, i will use BP_SIGNUPS_SKIP_USER_CREATION
since i don't need backward compatibility.
About the activation key, it's set, because i can see it in the activation mail and also in the user_meta
table.
When the function BP_Signup::add( $args );
is called, i can't still understand what can prevent it to insert a line in wp_signups
... a bad $usermeta who can break the sql insert ? I don't know if it's usefull but i'm using mariadb.
Also the google captcha seems to work, i'm not having registration spam for the moment.
Thank you,
#5
@
7 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
- Version 2.8.0 deleted
When the function BP_Signup::add( $args ); is called, i can't still understand what can prevent it to insert a line in wp_signups ... a bad $usermeta who can break the sql insert ?
Sorry for the late reply, @Maniou.
We have to add an entry into wp_signups
for pending registrations. I'm not sure if that is what you mean or not. If not, please let us know.
In the meantime, I'm going to close this as expected behavior. However, feel free to continue replying.
Hello @Maniou, thanks for the ticket.
Users with a
user_status
of 2 are likely (hopefully) from before BuddyPress was installed, or from before BuddyPress 2.0.Since 2.0, BuddyPress comes with the
bp_members_migrate_signups()
function, which happens as part of the 2.0 upgrade.Another part of this is largely a "known issue" with WordPress itself, and BuddyPress has yet to enforce any other rules or ideas around this area.
Related WordPress tickets:
You could try running the
bp_members_migrate_signups()
function manually, which will take all users with theuser_status
of 2 and give them an entry inwp_signups
.If that does the trick, please feel free to close this ticket on your own. If not, please include as many more details about these users as your are comfortable, which will help us determine if there's anything else worth doing.