WordPress.org

Forums

WP User Avatar
[resolved] fatal error (9 posts)

  1. Manish
    Member
    Posted 2 years ago #

    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/

  2. Bangbay Siboliban
    Member
    Posted 2 years ago #

    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.

  3. Manish
    Member
    Posted 2 years ago #

    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.

  4. Manish
    Member
    Posted 2 years ago #

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

  5. Bangbay Siboliban
    Member
    Posted 2 years ago #

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

  6. Manish
    Member
    Posted 2 years ago #

    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.

  7. Bangbay Siboliban
    Member
    Posted 2 years ago #

    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.

  8. Manish
    Member
    Posted 2 years ago #

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

  9. Bangbay Siboliban
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP User Avatar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.