mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-11 02:12:48 +00:00
27 lines
598 B
PHP
27 lines
598 B
PHP
<?php
|
|
declare (strict_types = 1);
|
|
|
|
namespace app\command;
|
|
|
|
use app\service\admin\auth\LoginService;
|
|
use think\console\Command;
|
|
use think\console\Input;
|
|
use think\console\Output;
|
|
|
|
class Resetpassword extends Command
|
|
{
|
|
protected function configure()
|
|
{
|
|
// 指令配置
|
|
$this->setName('reset')
|
|
->setDescription('the reset administrator password command');
|
|
}
|
|
|
|
protected function execute(Input $input, Output $output)
|
|
{
|
|
LoginService::resetAdministratorPassword();
|
|
// 指令输出
|
|
$output->writeln('password reset success');
|
|
}
|
|
}
|