From c35cc41a30e6d11344a804ed34b9f3c0069cdc43 Mon Sep 17 00:00:00 2001 From: Ahmet Bora Date: Thu, 22 Feb 2024 15:38:42 +0300 Subject: [PATCH] New `clear:logins` command --- README.md | 1 + commands/clear/logins.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 commands/clear/logins.php diff --git a/README.md b/README.md index 7580bd0..8563f69 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ This should print the Kirby CLI version and a list of available commands ``` - kirby clean:content - kirby clear:cache +- kirby clear:logins - kirby clear:media - kirby clear:sessions - kirby download diff --git a/commands/clear/logins.php b/commands/clear/logins.php new file mode 100644 index 0000000..d408320 --- /dev/null +++ b/commands/clear/logins.php @@ -0,0 +1,15 @@ + 'Deletes the users `.logins` file', + 'command' => static function (CLI $cli): void { + F::remove($cli->kirby()->root('accounts') . '/.logins'); + + $cli->success('The `.logins` file has been deleted'); + } +];