Skip to content

Commit

Permalink
Merge pull request #176 from humhub/fix/176-invite-controller
Browse files Browse the repository at this point in the history
Fix controller to invite users
  • Loading branch information
luke- committed Sep 5, 2024
2 parents 3b82466 + af5f5e9 commit b29237a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions controllers/user/InviteController.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php
/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
* @copyright Copyright (c) HumHub GmbH & Co. KG
* @license https://www.humhub.com/licences
*/

namespace humhub\modules\rest\controllers\user;

use humhub\modules\admin\permissions\ManageUsers;
use humhub\modules\rest\components\BaseController;
use humhub\modules\rest\models\Invite;
use humhub\modules\rest\definitions\InviteDefinitions;
Expand All @@ -15,7 +16,6 @@
use yii\validators\EmailValidator;
use yii\helpers\ArrayHelper;


/**
* Class InviteController
*/
Expand Down Expand Up @@ -63,7 +63,7 @@ public function actionList()

$pagination = $this->handlePagination($query, 10);

$results = ArrayHelper::getColumn($query->all(), function(Invite $invite) {
$results = ArrayHelper::getColumn($query->all(), function (Invite $invite) {
return InviteDefinitions::getInvite($invite);
});

Expand All @@ -79,4 +79,4 @@ protected function createInvite($email)
$userInvite->save();
$userInvite->sendInviteMail();
}
}
}
5 changes: 3 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Changelog
=========

0.10.2 (unreleased)
----------------------
0.10.2 (September 5, 2024)
--------------------------
- Enh #175: User language will be used by default
- Fix #176: Fix controller to invite users

0.10.1 (July 31, 2024)
----------------------
Expand Down

0 comments on commit b29237a

Please sign in to comment.