|
@@ -64,11 +64,32 @@ class UserApi {
|
|
return $this->info->toArray();
|
|
return $this->info->toArray();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function checkPwd() {
|
|
|
|
+ if (!$this->_checkPwd() && $this->usertype == 2 && in_array($this->info["source"], [1, 2])) {
|
|
|
|
+ //source3是新系统注册,企业号登录密码不正确时,验证一下是不是聚财账号
|
|
|
|
+ if ($this->info["source"] == 1) {
|
|
|
|
+ if (!$this->info["jUsername"]) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ $res = JucaiApi::login($this->username, $this->password, 1);
|
|
|
|
+ $resObj = json_decode($res);
|
|
|
|
+ if ($resObj->state == 1) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ } catch (think\exception $e) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 检查密码
|
|
* 检查密码
|
|
* @return type
|
|
* @return type
|
|
*/
|
|
*/
|
|
- public function checkPwd() {
|
|
|
|
|
|
+ public function _checkPwd() {
|
|
switch ($this->usertype) {
|
|
switch ($this->usertype) {
|
|
case 1:
|
|
case 1:
|
|
$salt = hash("md5", $this->info["salt"], true);
|
|
$salt = hash("md5", $this->info["salt"], true);
|