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.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 1.1.0 All 77 releases
← All changes | Modules/Auth/Classes/InvitationController.php +8 -0 2.6.012.10.01 View file →
@@ -154,11 +154,19 @@
154 154
155 155 public function resend(Request $request, $invitationId)
156 156 {
157 157 $invitation = Invitation::findOrFail($invitationId);
158 + /** @var Invitation $invitation */
158 159 $user = $this->getUser(true);
159 160 $space = Space::findOrFail($invitation->post_id);
160 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 + }
161 169
162 170 if ($invitation->reactions_count > 5) {
163 171 return $this->sendError([
164 172 'message' => __('You cannot resend this invitation', 'fluent-community')