本文整理汇总了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;
}
}