Skip to content

Commit

Permalink
New clear:logins command
Browse files Browse the repository at this point in the history
  • Loading branch information
afbora committed Feb 22, 2024
1 parent 1b7d168 commit c35cc41
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions commands/clear/logins.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types = 1);

use Kirby\CLI\CLI;
use Kirby\Filesystem\F;

return [
'description' => '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');
}
];

0 comments on commit c35cc41

Please sign in to comment.