diff --git a/api/v1/entries/users.php b/api/v1/entries/users.php index 91e7f2fecb..3401fc4781 100644 --- a/api/v1/entries/users.php +++ b/api/v1/entries/users.php @@ -48,8 +48,10 @@ class usersEntry extends entry $fields = 'account,dept,realname,email,commiter,gender'; $this->batchSetPost($fields); - $this->setPost('password1', $this->request('password')); - $this->setPost('password2', $this->request('password')); + $password = $this->request('password', '') ? md5($this->request('password')) : ''; + + $this->setPost('password1', $password); + $this->setPost('password2', $password); $this->setPost('passwordStrength', 3); $this->setPost('verifyPassword', md5($this->app->user->password . $this->app->session->rand)); diff --git a/test/lib/result.php b/test/lib/result.php deleted file mode 100644 index 891fc244db..0000000000 --- a/test/lib/result.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @package ZenTaoPMS - * @version $Id: $ - * @link http://www.zentao.net - */ -class result -{ - /** - * Original run result. - * - * @var mixed - * @access private - */ - private $runResult; - - /** - * Properties for testing. - * - * @var string - * @access private - */ - private $properties = ''; - - /** - * Check properties of result. - * - * @param string $fields If fields is empty, print result. - * @access public - */ - public function check($properties) - { - $this->properties = $properties; - } - - public function expect($expect) - { - if($this->properties) - { - } - } -}