[buddypress-trac] [BuddyPress] #3450: avatar image not showing correctly on registration / signup

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sun Aug 7 22:26:20 UTC 2011


#3450: avatar image not showing correctly on registration / signup
--------------------+-----------------------------
 Reporter:  rbbp22  |      Owner:
     Type:  defect  |     Status:  new
 Priority:  normal  |  Milestone:  Awaiting Review
Component:  Core    |    Version:
 Severity:  normal  |   Keywords:
--------------------+-----------------------------
 relates to BP 1.2.9 running on wp 3.2.1

 see also

 http://buddypress.org/community/groups/how-to-and-
 troubleshooting/forum/topic/avatar-upload-problem-during-registration/



 In theme bp-default register.php there should be a hidden field in the
 section below "Your Current Avatar" to pass along the bp  signup avatar
 directory for the new user.

 This hidden field is present when the user uploads the avatar but not
 before and after uploading (during registration). Hence the function
 bp_get_signup_avatar_dir_value() does not know the value of the
 registrant's avatar upload dir.

 Alos, I think the function

 bp_get_signup_avatar_dir_value() has a bug.

 I can't figure out when $bp->signup->avatar_dir would actually have a
 value or why it should be passed to the filter at the bottom of the
 function.


         function bp_get_signup_avatar_dir_value() {
                 global $bp;

                 // Check if signup_avatar_dir is passed
                 if ( !empty( $_POST['signup_avatar_dir'] ) ) {
                         $signup_avatar_dir = $_POST['signup_avatar_dir'];
 }
                 // If not, check if global is set
                 elseif ( !empty( $bp->signup->avatar_dir ) )
                         $signup_avatar_dir = $bp->signup->avatar_dir;

                 // If not, set false
                 else
                         $signup_avatar_dir = false;

   //  Seems to be a bug here. replaced $bp->signup->avatar_dir with
 $signup_avatar_dir

 // (original)
 //              return apply_filters( 'bp_get_signup_avatar_dir_value',
 $bp->signup->avatar_dir  );
 // (proposed fix)
         return apply_filters( 'bp_get_signup_avatar_dir_value',
 $signup_avatar_dir  );
         }

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3450>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list