diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php index e8a38ff9da795..23fe509c08192 100644 --- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php +++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php @@ -271,7 +271,7 @@ public function inviteAccepted(string $recipientProvider, string $token, string $response->throttle(); return $response; } - + if ($invitation->isAccepted() === true) { $response = ['message' => 'Invite already accepted', 'error' => true]; $status = Http::STATUS_CONFLICT; @@ -291,8 +291,8 @@ public function inviteAccepted(string $recipientProvider, string $token, string $response->throttle(); return $response; } - - $sharedFromEmail = $localUser->getPrimaryEMailAddress(); + + $sharedFromEmail = $localUser->getEMailAddress(); if ($sharedFromEmail === null) { $response = ['message' => 'Invalid or non existing token', 'error' => true]; $status = Http::STATUS_BAD_REQUEST;