FIX Auto publish a Member's profile image when saving

This commit is contained in:
Raissa North 2018-01-24 16:54:54 +13:00
parent b37ad24930
commit f38630c894

View File

@ -59,6 +59,11 @@ class BlogMemberExtension extends DataExtension
$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();
}
}
/**