Support Forum
I should of reported much earlier but I wrote it off as "might be working on it".
I noticed in topic view the user ranks of any user is admin. Though they don't have admin ability (I double checked). From within sp-topic-view-functions.php
I did a var_dump of $spThisPostUser and can see $spThisPostUser->rank[0]['name'] of every user is Admin. I tried tracking down but my brain went to mush too quickly.
Is this just me and a borked upgrade, or is anyone else seeing this?
Edit: I can't see this in the database. I can only see myself as admin. Unless this value is not in plain text.
I've never made special ranks, set up badges or anything before, but I checked all the same.
If visiting as guest, or logged in as normal user or Moderator, all looks correct (Member, Moderator, Admin etc). Ranks are as expected. If logged in as Admin (WP), it shows all members as Admin rank.
how are you generating the topic view - assuming this is the topic view, right?? are you using the topic class and query?
no rank info is stored in the db... generated on the fly...
Visit Cruise Talk Central and Mr Papa's World
This occurs with the default unmodified theme. On topic pages. I've disabled all forum plugins and all WP plugins (MU as well). I've tried with WP's Twenty-Ten and Twenty-Eleven themes. No additional code in profile.php's, nor additional code in SP's themes at all.
The only thing I can think of that might have an effect is SP options, or a combination of them. I'll keep messing around.
Progress!!!
This SP is being run on a multisite (blog 1 only) WP! That's why I'm the only one seeing this.
In sp-api-class-user.php around 175
# check for super admins and make admin a moderator as well if ($this->admin || (is_multisite() && is_super_admin())) { $this->admin = true; $this->moderator = true; $this->usertype = 'Admin'; }
If I remove the check for multisite and super admin like so:
# check for super admins and make admin a moderator as well //if ($this->admin || (is_multisite() && is_super_admin())) { if ($this->admin) { $this->admin = true; $this->moderator = true; $this->usertype = 'Admin'; }
All ranks are displayed correctly. I don't know why, I haven't dug far enough… and I admit. Reading and understanding what's going on inside a class is very hard for me.
is_super_admin() if not passed a user ID will use current users ID. So it was using my ID for all posters. Passing the posters ID fixes this problem 🙂
# check for super admins and make admin a moderator as well if ($this->admin || (is_multisite() && is_super_admin($id))) { $this->admin = true; $this->moderator = true; $this->usertype = 'Admin'; }
1 Guest(s)