WordPress.org

Support

Support » Plugins and Hacks » WP User Avatar » [Resolved] fatal error

[Resolved] fatal error

  • I get this error message when I upload an avatar image as a contributor from front end. I use classipress theme for posting ads.

    Fatal error: Cannot redeclare add_user() (previously declared in /home1/nims/public_html/demo/wp-admin/includes/user.php:17) in /home1/nims/public_html/demo/wp-admin/includes/user.php on line 18

    http://wordpress.org/plugins/wp-user-avatar/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi, I’ve taken a look at the theme. In framework/kernel/view-edit-profile.php on line 22, change:

    require ABSPATH . '/wp-admin/includes/user.php';

    to:

    if(!function_exists('add_user')){
      require ABSPATH . '/wp-admin/includes/user.php';
    }

    You may want to suggest this change as a permanent fix to the theme author.

    I’ve also noticed where I could add a check on my end. I’ll add it to the next version of the plugin.

    Thanks .. works now. However, if you could add the functionality to check the size of image before upload, it would be nice. At the moment it gives no error if the image size is bigger than the one set in settings. It adds a blank image.

    Also, in the settings, if you could give an option to set the default size of the avatar, it would be great.

    There was a bug with the file size checker. I’ve fixed it in version 1.5.8.

    Thanks a lot. Do we need to remove the fix you provided above for the update to work ?
    Also, in the settings, if you could give an option to set the default size of the avatar, it would be great.

    You can remove the fix I gave you, or leave it in. It won’t make any difference.

    How would you want to use the default avatar size? I’m not sure what the option would be used for.

    Pls see this screenshot of another plugin to understand what I mean
    http://wordpress.org/plugins/avatar-manager/screenshots/

    I’ve added the ability to resize images on upload for Contributors and Subscribers in version 1.6.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] fatal error’ is closed to new replies.
Skip to toolbar