User Avatar - Version 1.4.9

Version Description

  • made it work with 3.4.1 again Thanks juanmatias for the fix
  • allowed the user with 'edit_user' capability to update other peoples profiles thanks to greekdish
Download this release

Release Info

Developer oltdev
Plugin Icon wp plugin User Avatar
Version 1.4.9
Comparing to
See all releases

Code changes from version 1.4.8 to 1.4.9

Files changed (2) hide show
  1. readme.txt +6 -1
  2. user-avatar.php +4 -4
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
Contributors: sgagan, enej, oltdev, ctlt-dev, ubcdev
3
Tags: people lists, people, list, form, user profile, user avatar, thumbnail, upload photo, user, users, profile, biography, profile biography, user profile, description, profile description, rich text, wysiwyg, tinyMCE, photos, images, members, directory, profiles, jQuery, sortable, tabbable, thickbox, overlay, media button, Your Profile
4
Requires at least: 3.0
5
- Tested up to: 3.1
6
Stable Tag: trunk
7
8
Provides a thumbnail area in Your Profile, for users to upload & crop new images in an overlay to be saved and stored to their profile.
@@ -35,6 +35,11 @@ also shouldn't be have problems using this plugin.
35
36
37
== Changelog ==
38
= 1.4.8 =
39
* updated to the latest version of the timthumb 2.8.10
40
2
Contributors: sgagan, enej, oltdev, ctlt-dev, ubcdev
3
Tags: people lists, people, list, form, user profile, user avatar, thumbnail, upload photo, user, users, profile, biography, profile biography, user profile, description, profile description, rich text, wysiwyg, tinyMCE, photos, images, members, directory, profiles, jQuery, sortable, tabbable, thickbox, overlay, media button, Your Profile
4
Requires at least: 3.0
5
+ Tested up to: 3.4.1
6
Stable Tag: trunk
7
8
Provides a thumbnail area in Your Profile, for users to upload & crop new images in an overlay to be saved and stored to their profile.
35
36
37
== Changelog ==
38
+ = 1.4.9 =
39
+ * made it work with 3.4.1 again Thanks juanmatias for the fix
40
+ * allowed the user with 'edit_user' capability to update other peoples profiles thanks to greekdish
41
+
42
+
43
= 1.4.8 =
44
* updated to the latest version of the timthumb 2.8.10
45
user-avatar.php CHANGED
@@ -223,9 +223,9 @@ function user_avatar_add_photo_step1($uid)
223
</p>
224
<div id="user-avatar-step1">
225
<form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo admin_url('admin-ajax.php'); ?>?action=user_avatar_add_photo&step=2&uid=<?php echo $uid; ?>" >
226
- <label for="upload"><?php _e('Choose an image from your computer:','user-avatar'); ?></label><br /><input type="file" id="upload" name="uploadedfile" />
227
- <input type="hidden" name="action" value="save" />
228
- <?php wp_nonce_field('user-avatar') ?>
229
<p class="submit"><input type="submit" value="<?php esc_attr_e('Upload'); ?>" /></p>
230
</form>
231
</div>
@@ -649,7 +649,7 @@ function user_avatar_form($profile)
649
global $current_user;
650
651
// Check if it is current user or super admin role
652
- if(($profile->ID == $current_user->ID || is_super_admin($current_user->ID)))
653
{
654
$avatar_folder_dir = USER_AVATAR_UPLOAD_PATH."{$profile->ID}/";
655
?>
223
</p>
224
<div id="user-avatar-step1">
225
<form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo admin_url('admin-ajax.php'); ?>?action=user_avatar_add_photo&step=2&uid=<?php echo $uid; ?>" >
226
+ <label for="upload"><?php _e('Choose an image from your computer:','user-avatar'); ?></label><br /><input type="file" id="upload" name="uploadedfile" />
227
+
228
+ <?php wp_nonce_field('user-avatar') ?>
229
<p class="submit"><input type="submit" value="<?php esc_attr_e('Upload'); ?>" /></p>
230
</form>
231
</div>
649
global $current_user;
650
651
// Check if it is current user or super admin role
652
+ if( $profile->ID == $current_user->ID || current_user_can('edit_user', $current_user->ID) || is_super_admin($current_user->ID) )
653
{
654
$avatar_folder_dir = USER_AVATAR_UPLOAD_PATH."{$profile->ID}/";
655
?>