* Fix bug when bind user.

This commit is contained in:
dingguodong
2021-06-21 13:58:04 +08:00
parent 8b0bbb62cc
commit 19eb443a06
+5 -4
View File
@@ -124,16 +124,17 @@ class gitlab extends control
$user->account = $account;
$user->openID = $openID;
$this->dao->delete(TABLE_OAUTH)
$this->dao->delete()
->from(TABLE_OAUTH)
->where('openID')->eq($user->openID)
->andWhere('providerType')->eq('gitlab')
->andWhere('providerID')->eq($id)
->andWhere('providerType')->eq($user->providerType)
->andWhere('providerID')->eq($user->providerID)
->andWhere('account')->eq($user->account)
->exec();
$this->dao->insert(TABLE_OAUTH)->data($user)->exec();
}
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->sever->http_referer));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->server->http_referer));
}
$gitlab = $this->gitlab->getByID($gitlabID);