Merge pull request #53457 from mickenordin/master

fix(OCM-invites): Use the correct way of getting the email
This commit is contained in:
Andy Scherzinger 2025-06-12 19:17:44 +02:00 committed by GitHub
commit e6209d9135
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -271,7 +271,7 @@ class RequestHandlerController extends Controller {
$response->throttle();
return $response;
}
if ($invitation->isAccepted() === true) {
$response = ['message' => 'Invite already accepted', 'error' => true];
$status = Http::STATUS_CONFLICT;
@ -291,8 +291,8 @@ class RequestHandlerController extends Controller {
$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;