WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics for WordPress
Undefined property: WP_User::$user_level (1 post)

  1. gxxaxx
    Member
    Posted 2 years ago #

    Notice: Undefined property: WP_User::$user_level in .../google-analytics-for-wordpress/googleanalytics.php on line 1444

    This error(warning) is in function yoast_ga_do_tracking().
    Code gets the use object:
    $current_user = wp_get_current_user();

    Then code looks for public property
    $current_user->user_level

    Near as I can tell there is no such property.

    There is a public method: get_role_caps() that looks like it is the proper way to handle looking for user abilities.

    I can make the warnings go away. But I know no idea what the plugin would be doing if the proper method of checking abilities was used.

    http://wordpress.org/extend/plugins/google-analytics-for-wordpress/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic