Update Admin.php

This commit is contained in:
wolfcode
2023-07-21 01:10:26 +08:00
parent 0bc508235a
commit 0b607a5c1b

View File

@@ -73,6 +73,8 @@ class Admin extends AdminController
$post['auth_ids'] = implode(',', array_keys($authIds));
$rule = [];
$this->validate($post, $rule);
if (empty($post['password'])) $post['password'] = '123456';
$post['password'] = password($post['password']);
try {
$save = $this->model->save($post);
} catch (\Exception $e) {