PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.10.01
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.10.01
2.11.0 2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 All 78 releases
← All changes | Modules/Auth/Classes/InvitationController.php +8 -1 2.5.02.10.01 View file →
@@ -2,9 +2,8 @@
2 2
3 3 namespace FluentCommunity\Modules\Auth\Classes;
4 4
5 5 use FluentCommunity\App\Http\Controllers\Controller;
6 -use FluentCommunity\App\Models\BaseSpace;
7 6 use FluentCommunity\App\Models\Space;
8 7 use FluentCommunity\App\Models\SpaceUserPivot;
9 8 use FluentCommunity\App\Services\Helper;
10 9 use FluentCommunity\App\Services\ProfileHelper;
@@ -155,11 +154,19 @@
155 154
156 155 public function resend(Request $request, $invitationId)
157 156 {
158 157 $invitation = Invitation::findOrFail($invitationId);
158 + /** @var Invitation $invitation */
159 159 $user = $this->getUser(true);
160 160 $space = Space::findOrFail($invitation->post_id);
161 161 $space->verifyUserPermisson($user, 'community_moderator');
162 +
163 + // Links have no recipient; resending would mail an empty address and burn a redemption.
164 + if (!is_email($invitation->message)) {
165 + return $this->sendError([
166 + 'message' => __('Only email invitations can be resent.', 'fluent-community')
167 + ]);
168 + }
162 169
163 170 if ($invitation->reactions_count > 5) {
164 171 return $this->sendError([
165 172 'message' => __('You cannot resend this invitation', 'fluent-community')