|
|
|
@ -133,12 +133,29 @@ class User extends UserModel |
|
|
|
* @return bool |
|
|
|
* @throws BaseException |
|
|
|
*/ |
|
|
|
public function savePassword(array $data): bool |
|
|
|
public function savePassword(array $form): bool |
|
|
|
{ |
|
|
|
// 当前登录的用户信息 |
|
|
|
$userInfo = UserService::getCurrentLoginUser(true); |
|
|
|
// 默认数据 |
|
|
|
$data['password'] = encryption_hash($data['password']); |
|
|
|
$data['password'] = encryption_hash($form['password']); |
|
|
|
// 更新用户记录 |
|
|
|
return $userInfo->save($data); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 填写身份信息 |
|
|
|
* @param $form |
|
|
|
* @return bool |
|
|
|
* @throws BaseException |
|
|
|
*/ |
|
|
|
public function saveAuthenticationData($form): bool |
|
|
|
{ |
|
|
|
// 当前登录的用户信息 |
|
|
|
$userInfo = UserService::getCurrentLoginUser(true); |
|
|
|
// 默认数据 |
|
|
|
$data['id_no'] = $form['id_no']; |
|
|
|
$data['real_name'] = $form['real_name']; |
|
|
|
// 更新用户记录 |
|
|
|
return $userInfo->save($data); |
|
|
|
} |
|
|
|
|