-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
------------ * Jet Studio access reset tool
- Loading branch information
1 parent
6bf4388
commit bbe397b
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |