Skip to content

Commit

Permalink
FIX Auto publish a Member's profile image when saving
Browse files Browse the repository at this point in the history
  • Loading branch information
raissanorth committed Jan 24, 2018
1 parent b37ad24 commit f38630c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Model/BlogMemberExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public function onBeforeWrite()
$this->owner->URLSegment = preg_replace('/-[0-9]+$/', null, $this->owner->URLSegment) . '-' . $count;
$count++;
}

// Auto publish profile images
if ($this->owner->BlogProfileImage() && $this->owner->BlogProfileImage()->exists()) {
$this->owner->BlogProfileImage()->publishSingle();
}
}

/**
Expand Down

0 comments on commit f38630c

Please sign in to comment.