diff --git a/module/user/test/user.class.php b/module/user/test/user.class.php index a331d2e2e8..6b9f034272 100755 --- a/module/user/test/user.class.php +++ b/module/user/test/user.class.php @@ -437,6 +437,28 @@ class userTest return array('result' => (int)$result, 'errors' => $errors); } + /** + * 测试批量编辑用户前检查提交的数据。 + * Test check posted data before batch editing users. + * + * @param array $users + * @param string $verifyPassword + * @access public + * @return array + */ + public function checkBeforeBatchUpdateTest(array $users, string $verifyPassword): array + { + $result = $this->objectModel->checkBeforeBatchUpdate($users, $verifyPassword); + $errors = dao::getError(); + + foreach($errors as $key => $error) + { + if(is_array($error)) $errors[$key] = implode('', $error); + } + + return array('result' => (int)$result, 'errors' => $errors); + } + /** * 测试检查提交的用户密码。 * Test check posted user password.