Google Analytics by MonsterInsights
Undefined property: WP_User::$user_level (1 post)

  1. gxxaxx
    Posted 5 years ago #

    Using version 4.1.3
    Turned on debug so that I could check a theme I am working on and noticed persistent Undefined property: WP_User::$user_level at 1ine 1355

    To get the plugin to stop with the debug notices I inserted a isset test on $current_user->user_level

    Not sure what the implications are. (new to php and wp)

    I'm running in maintenance mode which could be the problem.

    function yoast_ga_do_tracking() {
    $current_user = wp_get_current_user();

    if (0 == $current_user->ID)
    return true;
    // stop debug notices fix
    if (!isset($current_user->user_level)) {
    return true;

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by MonsterInsights
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic