Title: How do I hack the Stats plugin?
Last modified: August 19, 2016

---

# How do I hack the Stats plugin?

 *  Resolved [pad](https://wordpress.org/support/users/pad/)
 * (@pad)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/how-do-i-hack-the-stats-plugin/)
 * My blog is all about user registrations, and I’ve just found out that WP.com 
   Stats ignores ANY logged in user. I thought it was just the admin.
 * There must be a way to edit the plugin’s code to make it detect any logged in
   user that isn’t the admin? Right?

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

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 2 months ago](https://wordpress.org/support/topic/how-do-i-hack-the-stats-plugin/#post-724808)
 * I’ve reported this problem to them before, but they never seem to get around 
   to fixing it… Annoying, I know.
 * Find this code:
 *     ```
       if ( !empty($current_user->ID) || empty($options['blog_id']) )
       	return;
       ```
   
 * Change it to this:
 *     ```
       if ( current_user_can('manage_options') || empty($options['blog_id']) )
       	return;
       ```
   
 * This will make it only ignore users who have the “manage_options” capability,
   which is generally only administrators.
 *  Thread Starter [pad](https://wordpress.org/support/users/pad/)
 * (@pad)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/how-do-i-hack-the-stats-plugin/#post-724822)
 * Many, many thanks Otto.

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

The topic ‘How do I hack the Stats plugin?’ is closed to new replies.

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [Wordpress stats](https://wordpress.org/support/topic-tag/wordpress-stats/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [pad](https://wordpress.org/support/users/pad/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/how-do-i-hack-the-stats-plugin/#post-724822)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
