- Fix: #2316: Reinvitation by email not working

This commit is contained in:
buddh4 2017-03-03 18:45:32 +01:00
parent d73cc14952
commit cbe3724e3a
2 changed files with 8 additions and 0 deletions

View File

@ -3,6 +3,7 @@ HumHub Change Log
1.2.0-beta.3 under developement
--------------------------------
- Fix: #2316: Reinvitation by email not working
- Fix: #2314: Html helper namespace issue in Markdown.php class
- Fix #2302: Hide file info for images on wall settings not applied.
- Fix: German translation error in Admin -> Users -> Groups -> Members -> Add Member UserPicker.

View File

@ -70,6 +70,13 @@ class InviteController extends Controller
$userInvite->email = $email;
$userInvite->source = Invite::SOURCE_INVITE;
$userInvite->user_originator_id = Yii::$app->user->getIdentity()->id;
$existingInvite = Invite::findOne(['email' => $email]);
if ($existingInvite !== null) {
$userInvite->token = $existingInvite->token;
$existingInvite->delete();
}
$userInvite->save();
$userInvite->sendInviteMail();
}