Skip to content

Commit c093943

Browse files
committed
idempotent to match
1 parent a7dfd50 commit c093943

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

webroot/panel/account.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,16 @@
8686
if ($hasGroups) {
8787
break;
8888
}
89+
// FIXME send an error message if already exists
8990
if (!$SQL->accDeletionRequestExists($USER->uid)) {
9091
$USER->requestAccountDeletion();
9192
}
9293
break;
9394
case "cancel_account_deletion_request":
94-
$USER->cancelRequestAccountDeletion();
95+
// FIXME send an error message if doesn't exist
96+
if ($SQL->accDeletionRequestExists($USER->uid)) {
97+
$USER->cancelRequestAccountDeletion();
98+
}
9599
break;
96100
}
97101
}

0 commit comments

Comments
 (0)