Skip to content

Commit

Permalink
Jet Tools - CLI
Browse files Browse the repository at this point in the history
------------
* Jet Studio access reset tool
  • Loading branch information
mirekmarek committed Oct 23, 2024
1 parent 6bf4388 commit bbe397b
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions _tools/cli/jet_studio_access_reset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/**
*
* @copyright Copyright (c) Miroslav Marek <[email protected]>
* @license http://www.php-jet.net/license/license.txt
* @author Miroslav Marek <[email protected]>
*/
namespace Jet;

require 'init/init.php';

if(php_sapi_name()!='cli') {
die('CLI only');
}

$username = '';
$password = '';


echo PHP_EOL. 'Enter username: ';
$username = readline('');

echo 'Password: ';
$password = readline('');


if($username && $password) {
IO_File::writeDataAsPhp( SysConf_Path::getData() . '_jet_studio_access.php', [
'username' => $username,
'password' => password_hash( $password, PASSWORD_DEFAULT )
] );

echo PHP_EOL.PHP_EOL. 'Done - JetStudio Access Reset' .PHP_EOL.PHP_EOL;
}

0 comments on commit bbe397b

Please sign in to comment.