File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ public function getAvatar()
327
327
return $ this ->author ->getAvatar ();
328
328
}
329
329
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 ' ;
331
331
}
332
332
333
333
/**
@@ -337,7 +337,15 @@ public function getAvatar()
337
337
*/
338
338
public static function getAuthors ()
339
339
{
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 ' );
341
349
}
342
350
343
351
/**
You can’t perform that action at this time.
0 commit comments