本文整理匯總了PHP中CB\User::getTSVConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP User::getTSVConfig方法的具體用法?PHP User::getTSVConfig怎麽用?PHP User::getTSVConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CB\User
的用法示例。
在下文中一共展示了User::getTSVConfig方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getAccessData
/**
* Get access data for a user to be displayed in user management window
*/
public function getAccessData($user_id = false)
{
if (!User::isVerified()) {
return array('success' => false, 'verify' => true);
}
if (!Security::canManage()) {
throw new \Exception(L\get('Access_denied'));
}
$user_id = $this->extractId($user_id);
$rez = $this->getUserData(array('data' => array('id' => $user_id)));
$rez['data']['groups'] = array();
$res = DB\dbQuery('SELECT a.group_id
FROM users_groups_association a
WHERE user_id = $1', $user_id) or die(DB\dbQueryError());
while ($r = $res->fetch_assoc()) {
$rez['data']['groups'][] = $r['group_id'];
}
$res->close();
//set tsv status
$tsv = User::getTSVConfig($user_id);
$rez['data']['tsv'] = empty($tsv['method']) ? 'none' : L\get('TSV_' . $tsv['method']);
return $rez;
}