WordPress.org

Ready to get started?Download WordPress

Forums

User Photo
Deprecated 'has_cap' function warning (1 post)

  1. Rutwick Gangurde
    Member
    Posted 2 years ago #

    This is quite a neat plugin for uploading a user pic. But there are a couple of warnings that may disturb something in your site! One of these warnings is:

    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /xyz/wp-includes/functions.php on line 2712

    The solution is to use current_user_can() instead. For example:
    The line:
    $current_user->has_cap('edit_users') is deprecated
    Instead use:
    current_user_can('edit_users')

    You can directly change the plugin file, but it is not recommended as a plugin update might overwrite your changes (if the authors don't implement this!)

    AUTHORS, please change this! ;)

    Hope this helps!

    - Rutwick

    http://wordpress.org/extend/plugins/user-photo/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic