Support » Plugin: User Registration, Login Form, User Profile & Membership ā€“ ProfilePress (Formerly WP User Avatar) » PHP Notice: Object of class WP_User could not be converted to int

  • Resolved cim

    (@cim)


    Hey guys, it’s me again. Query Monitor is throwing a notice:

    Object of class WP_User could not be converted to int

    when using

    [avatar_upload user="$id"]

    Here’s the rest from Query Monitor:

    Plugin: wp-user-avatar
    
    preg_replace_callback()
    wp-includes/shortcodes.php:197
    
    do_shortcode_tag()
    Unknown location
    
    WP_User_Avatar_Shortcode->wpua_edit_shortcode()
    Unknown location
    
    current_user_can('edit_user',WP_User (ID:1))
    wp-content/plugins/wp-user-avatar/includes/class-wp-user-avatar-shortcode.php:202
    
    WP_User->has_cap()
    Unknown location
    
    map_meta_cap()
    Unknown location
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,
    Please try with this shortcode
    [avatar_upload user= ID] //remove inverted commas

    I hope it helps you.

    Thanks

    Thread Starter cim

    (@cim)

    It’s still showing. Single, double, or no quotes still gives the same notice.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Notice: Object of class WP_User could not be converted to int’ is closed to new replies.