File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ public function getAvatar()
327327 return $ this ->author ->getAvatar ();
328328 }
329329
330- return 'http://www.gravatar.com/avatar/00000000000000000000000000000000 ?d=mm&f=y&s=50 ' ;
330+ return 'http://www.gravatar.com/avatar?d=mm&f=y&s=50 ' ;
331331 }
332332
333333 /**
@@ -337,7 +337,15 @@ public function getAvatar()
337337 */
338338 public static function getAuthors ()
339339 {
340- return ArrayHelper::map (static ::find ()->joinWith ('author ' )->groupBy ('createdBy ' )->asArray ()->all (), 'createdBy ' , 'author.username ' );
340+ $ query = static ::find ()
341+ ->alias ('c ' )
342+ ->select (['c.createdBy ' , 'a.username ' ])
343+ ->joinWith ('author a ' )
344+ ->groupBy ('c.createdBy ' )
345+ ->asArray ()
346+ ->all ();
347+
348+ return ArrayHelper::map ($ query , 'createdBy ' , 'author.username ' );
341349 }
342350
343351 /**
You can’t perform that action at this time.
0 commit comments