mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-10-05 22:13:03 -04:00
16 lines
326 B
PHP
16 lines
326 B
PHP
<?php
|
|
|
|
authorize();
|
|
|
|
$inviteKey = trim($_GET['invite'] ?? '');
|
|
$user = (new Gazelle\Manager\Invite)->findUserByKey($inviteKey, new Gazelle\Manager\User);
|
|
if (is_null($user)) {
|
|
error(404);
|
|
}
|
|
if ($user->id() != $Viewer->id()) {
|
|
error(403);
|
|
}
|
|
|
|
$user->removeInvite($inviteKey);
|
|
header('Location: user.php?action=invite');
|