Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Member stats not corresponding to user group info
Avatar
Stefan Zabel
Member
sp_UserOfflineSmall Offline
Jan 16, 2014 - 5:14 am

I suspect I don't fully understand what the member stats at the bottom of the forum represent.

I set someone up as a WP admin user but have since deleted them from the WP users screen. This person isn't showing in the moderator user group either. But they are still showing in the forum stats as a moderator.

My default user group for WP admin is moderator so I can see how they became a moderator, but not why they still are.

I've got someone else who I've moved from a moderator to forum admin using the 'manage admins' screen. They still show up in the stats as a moderator, not as admin. They don't show up in the moderator user group.

What is it that the stats show, historical members as well as current? This still wouldn't explain why I cannot see the new administrator listed though.

Thanks

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 16, 2014 - 6:13 am

Well the stats display data is cached and is coded to update itself once an hour (by default - you can change this on the options > global display settings admin panel).

It uses the WP core cron system to carry out the update. So the first question is - have these changes taken place longer ago than the current update settings? And - if so then perhaps your WP cron system is not functioning - and it is not unheard of!

Go to the forum admin > toolbox > cron inspector and find the entry for 'sph_stats_cron' in the active list. This will show when it is next due to run. Keep looking until it ticks over to see if anything changes. If it doesn't then that suggests the cron engine is not picking it up.

Probably the easiest way to get it picked up again is to simple deactivate Simple:Press (NOT uninstall of course) and immediately reactivate it. Unless there is a serious problem with the WP cron system then that will usually correct the issue.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Stefan Zabel
Member
sp_UserOfflineSmall Offline
Jan 16, 2014 - 12:22 pm

Ah, the moderator to admin move did happen so I guess I just had to wait. So hopefully cron is working.

However, I can still see the WP user I've deleted appearing as a moderator in the stats. They don't appear in the moderator user group.

Perhaps this and another issue I've just spotted might relate to how I've set up Wishlist/Simple Press integration?

I've noticed I can still see users with expired Wishlist membership on the forum. I guess I've integrated things ok in terms of adding users to the forum when they register as members in Wishlist, but what happens when they stop being Wishlist members? Does the integration allow members to be removed from the forum too? Have I missed a setting somewhere?

Thanks

edit, I checked under forum > users > member info and no sign of that moderator anywhere. However, I can see them as a moderator under admins > manage admins. Cannot see a delete option within manage admins though. How can I remove this person? Thanks

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 16, 2014 - 6:53 pm

wishlist does not delete or remove users when their membership expires...  as long as the users remain in wp, they will have access to the forum... there are not separate users for the forum...

can you see this moderator user in the db?  in the wp users table or the sfmembers table?  you can get their user id from the manage admins pane...  or are they still showing in the wp usermeta table?  the capabilities are stored by wp...

 

Avatar
Stefan Zabel
Member
sp_UserOfflineSmall Offline
Jan 17, 2014 - 12:06 pm

Hi, the moderator doesn't appear in wp users or wp usermeta but is in sfmembers.

I tried deleting another test wp user/Wishlist member/forum member via wp dashboard > users - it looks like they've disappeared from everything except sfmembers.

Should they be removed from sfmembers automatically?

Thanks

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 17, 2014 - 2:39 pm

Let us put it this way... WordPress functions via a system of 'hooks'. Think of them as messages being passed from core to plugins and back that announce than an event has taken place.

When a user is deleted in WP - such a 'message' is sent out to any plugin listening for it so that it can act of required. This happens and Simple:Press picks it up and removes the sfmembers record.

If this is not removed then it suggests very strongly that the message was not sent - or - to be technical -the hook was not fired and Simple:Press never got the message...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Stefan Zabel
Member
sp_UserOfflineSmall Offline
Jan 17, 2014 - 4:44 pm

Thanks.

Can you point me in the right direction in terms of what to do next? From what you say, it sounds like sfmembers is automatically kept up to date, so something's going wrong.

Do I have a WP problem of some kind rather than an issue with SP or is it the integration between the two?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 17, 2014 - 8:37 pm

sorry, think Andy forgot about a bug in 5.4 (introduced in 5.4 when another fix was added) where the a mysql error is generated and the row in sfmembers is not deleted...

we are currently discussing when to release 5.4.1 with this fix and other changes...  no date yet... but you can make the fix yourself if you like...

in simple-press/sp-api/sp-api-users.php around line 261, change

$wpdb->query("DELETE ".$wpdb->prefix."sfmembers WHERE user_id=$userid");

to

$wpdb->query("DELETE FROM ".$wpdb->prefix."sfmembers WHERE user_id=$userid");

 

Avatar
Stefan Zabel
Member
sp_UserOfflineSmall Offline
Jan 20, 2014 - 3:47 am

I tested with a new member and it worked, they got deleted completely when I deleted their wishlist membership. I deleted the moderator from sfmembers to clean things up too.

Thanks very much!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 20, 2014 - 5:32 am

...and my sincerest apologies for forgetting that bug in the delete query. Considering it was me that found it then that was an odd oversight on my part.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625