Title: [Plugin: User Photo] Deprecated &#039;has_cap&#039; function warning
Last modified: August 20, 2016

---

# [Plugin: User Photo] Deprecated 'has_cap' function warning

 *  [Rutwick Gangurde](https://wordpress.org/support/users/rutwick/)
 * (@rutwick)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-user-photo-deprecated-has_cap-function-warning/)
 * 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/](http://wordpress.org/extend/plugins/user-photo/)

The topic ‘[Plugin: User Photo] Deprecated 'has_cap' function warning’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/user-photo.svg)
 * [User Photo](https://wordpress.org/plugins/user-photo/)
 * [Support Threads](https://wordpress.org/support/plugin/user-photo/)
 * [Active Topics](https://wordpress.org/support/plugin/user-photo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-photo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-photo/reviews/)

## Tags

 * [deprecated](https://wordpress.org/support/topic-tag/deprecated/)
 * [has_cap](https://wordpress.org/support/topic-tag/has_cap/)

 * 0 replies
 * 1 participant
 * Last reply from: [Rutwick Gangurde](https://wordpress.org/support/users/rutwick/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-user-photo-deprecated-has_cap-function-warning/)
 * Status: not resolved