+ userTest: add method to test the checkVerifyPassword method.

This commit is contained in:
liugang
2023-12-12 17:09:24 +08:00
parent 08eff55ac2
commit cb1ff3b0ad
+21
View File
@@ -438,6 +438,27 @@ class userTest
}
}
/**
* 测试验证当前用户登录密码的功能。
* Test check verify password of current user.
*
* @param string $verifyPassword
* @access public
* @return array
*/
public function checkVerifyPasswordTest(string $verifyPassword): array
{
$result = $this->objectModel->checkVerifyPassword($verifyPassword);
$errors = dao::getError();
foreach($errors as $key => $error)
{
if(is_array($error)) $errors[$key] = implode(',', $error);
}
return array('result' => (int)$result, 'errors' => $errors);
}
/**
* Identify user.
*