|
|
@@ -95,14 +95,14 @@ class User extends Api
|
|
|
$old_pwd = $this->request->post("old_pwd", '', null);
|
|
|
$new_pwd = $this->request->post("new_pwd", '', null);
|
|
|
$confirm_pwd = $this->request->post("confirm_pwd", '', null);
|
|
|
-
|
|
|
$rule = [
|
|
|
'old_pwd' => 'require|regex:\S{6,30}',
|
|
|
'new_pwd' => 'require|regex:\S{6,30}',
|
|
|
'confirm_pwd' => 'require|regex:\S{6,30}|confirm:new_pwd',
|
|
|
];
|
|
|
-
|
|
|
$msg = [
|
|
|
+ 'old_pwd.regex' => __('Password must be 6 to 30 characters'),
|
|
|
+ 'new_pwd.regex' => __('Password must be 6 to 30 characters'),
|
|
|
'new_pwd.confirm' => __('Password and confirm password don\'t match')
|
|
|
];
|
|
|
$data = [
|
|
|
@@ -120,7 +120,6 @@ class User extends Api
|
|
|
if (!$result) {
|
|
|
$this->error(__($validate->getError()));
|
|
|
}
|
|
|
-
|
|
|
$ret = $this->auth->changepwd($new_pwd, $old_pwd);
|
|
|
if ($ret) {
|
|
|
$this->success(__('Reset password successful'));
|
|
|
@@ -167,6 +166,8 @@ class User extends Api
|
|
|
];
|
|
|
|
|
|
$msg = [
|
|
|
+ 'login_pwd.regex' => __('Password must be 6 to 30 characters'),
|
|
|
+ 'new_pwd.regex' => __('Password must be 6 to 30 characters'),
|
|
|
'new_pwd.confirm' => __('Password and confirm password don\'t match')
|
|
|
];
|
|
|
$data = [
|
|
|
@@ -265,7 +266,8 @@ class User extends Api
|
|
|
'confirm_pwd' => 'require|regex:\S{6,30}|confirm:new_pwd',
|
|
|
];
|
|
|
$msg = [
|
|
|
-
|
|
|
+ 'mobile.regex' => __('Mobile is incorrect'),
|
|
|
+ 'new_pwd.regex' => __('Password must be 6 to 30 characters'),
|
|
|
'new_pwd.confirm' => __('Password and confirm password don\'t match')
|
|
|
];
|
|
|
$data = [
|