本文整理汇总了PHP中SJB_UserManager::getUserSIDsLikeFirstNameOrLastName方法的典型用法代码示例。如果您正苦于以下问题:PHP SJB_UserManager::getUserSIDsLikeFirstNameOrLastName方法的具体用法?PHP SJB_UserManager::getUserSIDsLikeFirstNameOrLastName怎么用?PHP SJB_UserManager::getUserSIDsLikeFirstNameOrLastName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SJB_UserManager
的用法示例。
在下文中一共展示了SJB_UserManager::getUserSIDsLikeFirstNameOrLastName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: prepareRequestedCriteria
private function prepareRequestedCriteria()
{
if ($idKeyword = SJB_Request::getVar('idKeyword', false)) {
if (strpos($idKeyword, ',') !== false) {
$idKeywordTrimmed = array();
foreach (explode(',', $idKeyword) as $idK) {
$idKeywordTrimmed[] = SJB_HelperFunctions::trimValue($idK);
}
foreach ($idKeywordTrimmed as $val) {
if (intval($val)) {
$_REQUEST['sid']['in'][] = (int) $val;
} else {
unset($_REQUEST['sid']['in']);
$_REQUEST['keywords']['like'][] = $val;
}
}
} else {
if (intval($idKeyword)) {
$_REQUEST['sid']['equal'] = (int) $idKeyword;
} else {
$_REQUEST['keywords']['like'] = SJB_HelperFunctions::trimValue($idKeyword);
}
}
}
if ($companyUserName = SJB_Request::getVar('company_name', false)) {
if (!empty($companyUserName['like'])) {
$listingSids = SJB_UserManager::getUserSIDsLikeCompanyName($companyUserName['like']);
if (empty($listingSids)) {
unset($_REQUEST['company_name']);
}
$usernameLikeSids = SJB_UserManager::getUserSIDsLikeUsername(SJB_DB::quote($companyUserName['like']));
$firstLastNameLikeSids = SJB_UserManager::getUserSIDsLikeFirstNameOrLastName(SJB_DB::quote($companyUserName['like']));
$_REQUEST['user_sid']['in'] = array_merge(!empty($usernameLikeSids) ? $usernameLikeSids : array(''), !empty($firstLastNameLikeSids) ? $firstLastNameLikeSids : array(''));
}
}
}