忘记密码限制

master
tpingzhang 5 years ago
parent 23ba12cf98
commit 0e3c2d6809

@ -1055,6 +1055,10 @@ class UserController extends BaseController
if ($user['code_type'] != 2) { if ($user['code_type'] != 2) {
$this -> sms_verify($user['phone'], $user['code']); $this -> sms_verify($user['phone'], $user['code']);
} }
if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['password'])){
$this -> set_message(1027, "fail", "密码必须6-15位字母和数字组合");
}
$result = $userApi -> updatePassword($user['user_id'], $user['password']); $result = $userApi -> updatePassword($user['user_id'], $user['password']);
if ($result == true) { if ($result == true) {

Loading…
Cancel
Save