Skip to content

Commit

Permalink
Enh: Directory alphabetical sort in groups
Browse files Browse the repository at this point in the history
  • Loading branch information
luke- committed Dec 28, 2015
1 parent 0a286cd commit fbcfcbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -134,7 +134,7 @@ public function actionSpaces()
*/
public function actionGroups()
{
$groups = \humhub\modules\user\models\Group::find()->all();
$groups = \humhub\modules\user\models\Group::find()->orderBy(['name' => SORT_ASC])->all();

\yii\base\Event::on(Sidebar::className(), Sidebar::EVENT_INIT, function($event) {
$event->sender->addWidget(\humhub\modules\directory\widgets\GroupStatistics::className(), [], ['sortOrder' => 10]);
Expand Down
Expand Up @@ -16,7 +16,7 @@

<?php if ($userCount != 0) : ?>
<h1><?php echo Html::encode($group->name); ?></h1>
<?php foreach (User::find()->where(['group_id' => $group->id])->active()->limit(30)->all() as $user) : ?>
<?php foreach (User::find()->where(['group_id' => $group->id])->active()->limit(30)->joinWith('profile')->orderBy(['profile.lastname' => SORT_ASC])->all() as $user) : ?>
<a id="<?php echo $user->guid; ?>" href="<?php echo $user->getUrl(); ?>">
<img data-toggle="tooltip" data-placement="top" title=""
data-original-title="<?php echo Html::encode($user->displayName); ?>"
Expand Down

0 comments on commit fbcfcbb

Please sign in to comment.