Support Forum

Registered Users now Appear as Guests

MA mann
mann
Member

Just now I was posting on my forums and I was surprised to see that all posts that I had made so far now appear as posted by “guest”.

I saw my forum stats at the bottom and all the names of the top registered users who had posted counts of 50+ have disappeared and the number of members in the forum has shrunk from 8k to 800. I checked my WP database to see whether the users have got deleted, but all the users are there. Any idea what’s happening ? How is it possible for the registered users to become  become “Guests” without me changing anything ?

11 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Nothing I know of could do this so…
I assume you checked your WP Users table. What about the SP sfmembers table?

MP Mr Papa
Mr Papa
Member

do you have the setting to auto remove users?  and as Andy says, are they in both wp users and sf members table?

MA mann
mann
Member

Just checked the tables. While all the 9000+ users are there in the wp-users table, only 900 users are there in the sf members table. I also checked the auto remove users setting, it is disabled so that couldn’t have caused this problem.. Weird.

YS Yellow Swordfish
Yellow Swordfish
Member

I am afraid to say I can offer no explanation. I do not believe we have ever had a report of randomly losing members form that table – well until this one – and I can see no reason that could cause it – not from within SP itself anyway.

Can you not recall any actions you may have taken that may have caused this in any way?

MA mann
mann
Member

I may have updated a plugin or two but not sure. Here’s a weird thing I noticed. On the post below if you see, Team Aristotle now appears as “Guest”. This post was posted months back 

http://www.aristotleprep.com/forums/feedbacksuggestions/order-226-cannot-find-the-pdf-resources-in-my-account-for-download/

However on the post below that we posted on the forum yesterday, our post count appears as 1 and we appear as registered member.

http://www.aristotleprep.com/forums/sentence-correction/sc-grail-no-31/

What this means, I think, is that something happened because of which the registered members turned into guests. But what I can’t figure out is this how would they appear as “registered members” on posting now.

Can you guys think of why this weird thing is happening ?We may have to bring 007 here to solve this mystery ;)

One solution i can think of is to import all wp-users to sf-members-if something of this sort is possible in the first place.  Will continue my investigation

 

YS Yellow Swordfish
Yellow Swordfish
Member

I can certainly answer the first question. If a registered user (in WP) logs into the forum and we find they do not have an ‘sfmembers’ record then this is created on the fly. So that explains the first half here.

The big question of where the ‘sfmembers’ record went to is still a mystery.

We don’t have any current mechanism to import WP users into ‘sfmembers’. But I will give it some thought now…

MA mann
mann
Member

After doing a lot of research, I still couldn’t figure out what to do about the problem so here’s the bare minimum solution I thought we can implement. 

Since it wouldn’t be possible to make all the guests as registered members, is it possible to at reset the stats for admin because it looks weird that the current post count of admin is just 4. Also it is possible to reset the forum stats at the bottom of the forum page to the real figure of 9000 members.

Guys, even if these two things can be implemented, it’ll help a lot. 

YS Yellow Swordfish
Yellow Swordfish
Member

Well – all of the stats functions are in the sp-common-view-functions.php file and these are all documented in the codex here – http://codex.simple-press.com/codex/api/template-functions-and-the-api/display-template-functions/common-view/ – and each one does have a filter on the html that will be displayed which would allow you to modify it. That would be the best approach even if not ideal.

So are you good with coding up WP filters? Not hard to use and the WP codex explains how if you are not.

MA mann
mann
Member

Andy, I wish I had known a little about WP filters but unfortunately I don’t. If you could tell me here what exact steps do I need to take to accomplish what I mentioned above,it’d make my day. Else I’m even ready to pay you guys if you could do the stats resetting part for me.

YS Yellow Swordfish
Yellow Swordfish
Member

We are seriously snowed under at the moment and for the forseeable future but we can help and advise. But you will need some php…

The fist step is to look at the documentation here – http://codex.wordpress.org/Plugin_API – filters are a WordPress construct.

Basically it means you write a small function outside of SP and we provide the filter which can call your code and pass any information you need to manipulate – in this case, the stats data.

You then take that data and your code does what it needs to do and returns the changed data you want to be used.

The beauty of this is that there is NO core code changes to anything which also means that you can continue to update SP safely.