Skip to content

Commit

Permalink
Merge pull request #60 from getkirby/feature/clear-logins
Browse files Browse the repository at this point in the history
New `clear:logins` command
  • Loading branch information
bastianallgeier authored Feb 22, 2024
2 parents 1a37e3d + 995b8f1 commit b6837de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ This should print the Kirby CLI version and a list of available commands
- kirby clean:content
- kirby clear:cache
- kirby clear:lock
- kirby clear:logins
- kirby clear:media
- kirby clear:sessions
- kirby download
Expand Down Expand Up @@ -283,8 +284,3 @@ return [

© 2009 Bastian Allgeier
[getkirby.com](https://getkirby.com) · [License agreement](./LICENSE.md)





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 b6837de

Please sign in to comment.