REST Endpoint for pending invites - Extended response (#7138)

* REST Endpoint for pending invites - Extended response

* REST Endpoint for pending invites - Extended response

* REST Endpoint for pending invites - Extended response

* Update CHANGELOG.md

---------

Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
Gevorg Mansuryan 2024-07-25 19:12:26 +04:00 committed by GitHub
parent 15a23d6ce6
commit fef09e31bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 2 deletions

View File

@ -10,6 +10,7 @@ HumHub Changelog
- Enh #7128: Prerequisites - check for mixed table collations
- Enh #7129: Link `wall-entry-controls`- color to `--text-color-soft`
- Chg #7136: When opening a modal box, don't autofocus automatically on the first form input
- Enh #7138: Added missing DB relations to UserInvite model
1.16.2 (Unreleased)
---------------------

View File

@ -35,8 +35,10 @@ use yii\helpers\Url;
* @property string $lastname
* @property string $captcha
*
* @property Space $space
* @property User|null $originator
* @property-read Space $space
* @property-read User|null $originator
* @property-read User|null $createdBy
* @property-read User|null $updatedBy
*/
class Invite extends ActiveRecord
{
@ -313,4 +315,14 @@ class Invite extends ActiveRecord
!$this->skipCaptchaValidation
&& (Yii::$app->getModule('user')->settings->get('auth.showCaptureInRegisterForm'));
}
public function getCreatedBy()
{
return $this->hasOne(User::class, ['id' => 'created_by']);
}
public function getUpdatedBy()
{
return $this->hasOne(User::class, ['id' => 'updated_by']);
}
}