Title: [Plugin: Google Analytics for WordPress] Logic problem on GA_Admin::authenticate()
Last modified: August 20, 2016

---

# [Plugin: Google Analytics for WordPress] Logic problem on GA_Admin::authenticate()

 *  [mckabi](https://wordpress.org/support/users/mckabi/)
 * (@mckabi)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-logic-problem-on-ga_adminauthenticate/)
 * define(‘GAWP_VERSION’, ‘4.2.2’);
 * GA_Admin::_construct()
 *     ```
       add_action('admin_init',  			array(&$this, 'authenticate') );
       ```
   
 * GA_Admin::authenticate()
 *     ```
       function authenticate() {
       	if ( isset( $_REQUEST['oauth_token'] ) ) {
       		...snip...
       		wp_redirect( menu_page_url( $this->hook, false ) );
       	}
       ```
   
 * OAuth is not GAWP own.
    Many plugins that use OAuth is affected.
 * Please check the below patch.
 *     ```
       function authenticate() {
       +	if ( !isset( $_REQUEST['page'] ) || $_REQUEST['page'] != $this->hook ) return;
       	if ( isset( $_REQUEST['oauth_token'] ) ) {
        		$o = get_option( $this->optionname );
       ```
   
 * or strpos($_SERVER[‘REQUEST_URI’], menu_page_url($this->hook, false))
    or better
   your solutions
 * Thanks.
 * [http://wordpress.org/extend/plugins/google-analytics-for-wordpress/](http://wordpress.org/extend/plugins/google-analytics-for-wordpress/)

The topic ‘[Plugin: Google Analytics for WordPress] Logic problem on GA_Admin::authenticate()’
is closed to new replies.

 * ![](https://ps.w.org/google-analytics-for-wordpress/assets/icon.svg?rev=2976619)
 * [MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)](https://wordpress.org/plugins/google-analytics-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-for-wordpress/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [mckabi](https://wordpress.org/support/users/mckabi/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-logic-problem-on-ga_adminauthenticate/)
 * Status: not resolved