• Resolved hypable

    (@hypable)


    I just installed this plugin for the purpose of offering my authors the ability to see their individual stats. Unfortunately, even though the “Restrict Authors” setting is turned on, the users still see all stats in the top posts section no matter who wrote it. Is the Restrict Authors feature supposed to only show THEIR top articles in the Top Posts area of the Overview page? That’s what I’m looking for.

    If there’s another way I can share this information with them (the number of page views for only their posts. I don’t want them to have access to the data for other articles), I’d love to hear how to do it! Thanks

    https://ww.wp.xz.cn/plugins/wp-slimstat/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Jason Crouse

    (@coolmann)

    Hi,

    We’re looking into this. It might be a bug.

    Thanks,
    Camu

    Plugin Contributor Jason Crouse

    (@coolmann)

    Please keep in mind that if those authors are also admins, this will override the filter, as admins are allowed to see everything:

    if (wp_slimstat::$options['restrict_authors_view'] == 'yes' && !current_user_can('manage_options')){
    	$filters[] = 'author equals '.$GLOBALS['current_user']->user_login;
    	self::$hidden_filters['author'] = 1;
    }

    If that’s not the case, could you please enable debug mode in Settings > Advanced and paste the SQL generated for the Real Time report?

    Thread Starter hypable

    (@hypable)

    Hi,
    Thanks for the response. The users are at the ‘editor’ level of WordPress, they are not admins.

    Is this the SQL you’re looking for? Got it from the Real Time page after enabling debug mode.

    SELECT t1.*, tb.browser,tb.version,tb.platform,tb.css_version,tb.type,tb.user_agent,tci.content_type,tci.category,tci.author,tci.content_id,tob.outbound_domain,tob.outbound_resource FROM wp_slim_stats t1 INNER JOIN wp_slim_browsers tb ON t1.browser_id = tb.browser_id INNER JOIN wp_slim_content_info tci ON t1.content_info_id = tci.content_info_id LEFT JOIN wp_slim_outbound tob ON t1.id = tob.id WHERE t1.id <> 0 AND (t1.dt BETWEEN 1417392000 AND 1418645151) ORDER BY t1.dt desc LIMIT 0, 50
    SELECT COUNT(*) counthits FROM wp_slim_stats t1 INNER JOIN wp_slim_browsers tb ON t1.browser_id = tb.browser_id INNER JOIN wp_slim_content_info tci ON t1.content_info_id = tci.content_info_id LEFT JOIN wp_slim_outbound tob ON t1.id = tob.id WHERE 1=1 AND (t1.dt BETWEEN 1417392000 AND 1418645151)
    Plugin Contributor Jason Crouse

    (@coolmann)

    What version of Slimstat are you using? Do you have any add-ons active? Do your editors have the capability to ‘manage_options’ (via a custom Role Manager plugin or something?)

    Thread Starter hypable

    (@hypable)

    Version 3.8.5. No other add ons. Yes, they have the manage_options capability activated. Thanks!

    Plugin Contributor Jason Crouse

    (@coolmann)

    That explains why. “Manage options” is the capability that overrides the other setting, since by default those who have that capability are considered administrators.

    http://codex.ww.wp.xz.cn/Roles_and_Capabilities#Administrator

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Restrict authors not functioning as described’ is closed to new replies.