diff options
Diffstat (limited to 'app/model/deleteaccount.php')
-rw-r--r-- | app/model/deleteaccount.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/model/deleteaccount.php b/app/model/deleteaccount.php index 8153f0f..d83537e 100644 --- a/app/model/deleteaccount.php +++ b/app/model/deleteaccount.php @@ -26,7 +26,11 @@ if (isAction("deleteaccount")) if (!$form->populate(input())) return; - $user = user::getCurrent(); + if (!($user = user::getCurrent())) + { + logError(ERROR, "You must be logged in to close your account"); + return; + } if (!$user->validatePasswd($form->passwd)) { |