本文整理汇总了PHP中account::setGCM_regId方法的典型用法代码示例。如果您正苦于以下问题:PHP account::setGCM_regId方法的具体用法?PHP account::setGCM_regId怎么用?PHP account::setGCM_regId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类account
的用法示例。
在下文中一共展示了account::setGCM_regId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
unset($account);
if ($result['error'] === false) {
$account = new account($dbo);
$account->setState(ACCOUNT_STATE_ENABLED);
$account->setLastActive();
$result = $account->signin($username, $password);
unset($account);
if ($result['error'] === false) {
$auth = new auth($dbo);
$result = $auth->create($result['accountId'], $clientId);
if ($result['error'] === false) {
$account = new account($dbo, $result['accountId']);
if (strlen($facebookId) != 0) {
$helper = new helper($dbo);
if ($helper->getUserIdByFacebook($facebookId) == 0) {
$account->setFacebookId($facebookId);
}
} else {
$account->setFacebookId("");
}
if (strlen($gcm_regId) != 0) {
$account->setGCM_regId($gcm_regId);
}
$result['account'] = array();
array_push($result['account'], $account->get());
}
}
}
echo json_encode($result);
exit;
}
示例2: isset
<?php
/*!
* ifsoft.co.uk engine v1.0
*
* http://ifsoft.com.ua, http://ifsoft.co.uk
* qascript@ifsoft.co.uk
*
* Copyright 2012-2015 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
*/
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
$accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
$accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
$gcm_regId = isset($_POST['gcm_regId']) ? $_POST['gcm_regId'] : '';
$gcm_regId = helper::clearText($gcm_regId);
$gcm_regId = helper::escapeText($gcm_regId);
$result = array("error" => true, "error_code" => ERROR_UNKNOWN);
$auth = new auth($dbo);
if (!$auth->authorize($accountId, $accessToken)) {
api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
}
$account = new account($dbo, $accountId);
$result = $account->setGCM_regId($gcm_regId);
echo json_encode($result);
exit;
}