We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adcdb13 commit a337baaCopy full SHA for a337baa
1 file changed
ProcessMaker/Models/User.php
@@ -308,12 +308,8 @@ public function setAvatarAttribute($value = null)
308
*/
309
public function getAvatar()
310
{
311
- $mediaFile = $this->getMedia(self::COLLECTION_PROFILE);
312
- $url = '';
313
- foreach ($mediaFile as $media) {
314
- $url = $media->getFullUrl();
315
- }
316
-
+ $media = $this->getMedia(self::COLLECTION_PROFILE);
+ $url = $media->last()->getFullUrl();
317
return $url;
318
}
319
0 commit comments