@Override
  public void setCurrentUser(User currentUser) {
    super.setCurrentUser(currentUser);
    User user = this.getCurrentUser();
    if (null != user) {
      CrmOperations crmOperations = crmOperationsProvider.get();
      if (user.isProfilePhotoImported()) {
        ProfilePhoto profilePhoto = crmOperations.getUserProfilePhoto();
        byte[] profilePhotoBytes = profilePhoto.getBytes();
        Bitmap bm = BitmapFactory.decodeByteArray(profilePhotoBytes, 0, profilePhotoBytes.length);
        userProfileImageView.setImageBitmap(bm);

        String editYourProfilePhoto = getActivity().getString(R.string.edit_profile_photo);
        changeProfilePhotoButton.setText(String.format(editYourProfilePhoto, user.getFirstName()));
      }
    }
  }
 protected void transmitProfilePhoto(byte data[]) {
   final CrmOperations crmOperations = crmOperationsProvider.get();
   Assert.isTrue(data != null && data.length > 0);
   crmOperations.setProfilePhoto(data, MediaType.IMAGE_JPEG);
 }