本文整理匯總了PHP中ICanLocalizeQuery::transfer_account方法的典型用法代碼示例。如果您正苦於以下問題:PHP ICanLocalizeQuery::transfer_account方法的具體用法?PHP ICanLocalizeQuery::transfer_account怎麽用?PHP ICanLocalizeQuery::transfer_account使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ICanLocalizeQuery
的用法示例。
在下文中一共展示了ICanLocalizeQuery::transfer_account方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ICanLocalizeQuery
function transfer_icl_account($create_account_and_transfer)
{
$user = $_POST['user'];
$user['site_id'] = $this->settings['site_id'];
$user['accesskey'] = $this->settings['access_key'];
$user['create_account'] = $create_account_and_transfer ? '1' : '0';
$icl_query = new ICanLocalizeQuery();
list($success, $access_key) = $icl_query->transfer_account($user);
if ($success) {
$this->settings['access_key'] = $access_key;
// set the support data the same.
$this->settings['support_access_key'] = $access_key;
$this->save_settings();
return true;
} else {
$_POST['icl_form_errors'] = $access_key;
return false;
}
}