mirror of https://github.com/openspug/spug
U 优化命令行工具重置密码操作
parent
79a1f06ddb
commit
1f6d23c97a
|
@ -67,6 +67,7 @@ class Command(BaseCommand):
|
|||
return self.echo_error(f'未找到登录名为【{options["u"]}】的账户')
|
||||
user.password_hash = User.make_password(options['p'])
|
||||
user.save()
|
||||
cache.delete(user.username)
|
||||
self.echo_success('账户密码已重置')
|
||||
else:
|
||||
self.echo_error('未识别的操作')
|
||||
|
|
Loading…
Reference in New Issue