game2006api/webapp/controller/AccountVerifyController.class.php
aozhiwei d3de48d0bd 1
2023-08-30 18:38:15 +08:00

46 lines
1.3 KiB
PHP

<?php
use phpcommon\SqlHelper;
class AccountVerifyController extends BaseController {
public function canBind()
{
$guestAccount = getReqVal('guest_account', '');
$targetPlat = getReqVal('target_plat', '');
$targetAccount = getReqVal('target_account', '');
$channel = phpcommon\extractChannel($guestAccount);
$gameId = phpcommon\extractGameId($guestAccount);
if ($channel != TAPTAP_CHANNEL ||
$gameId != 2006) {
myself()->_rspErr(1, 'guest_account error');
return;
}
{
$row = SqlHelper::ormSelectOne(
myself()->_getMysql(''),
't_user',
array(
'account_id' => $guestAccount
));
if (!$row) {
myself()->_rspErr(1, 'guest_account not found');
return;
}
}
{
$row = SqlHelper::ormSelectOne(
myself()->_getMysql(''),
't_user',
array(
'account_id' => BC_POLY_CHANNEL . '_2006_' . $targetPlat . '_' . $targetAccount
));
if ($row) {
myself()->_rspErr(1, 'cannot bind');
return;
}
}
}
}