本文整理汇总了PHP中CUser::err_mess方法的典型用法代码示例。如果您正苦于以下问题:PHP CUser::err_mess方法的具体用法?PHP CUser::err_mess怎么用?PHP CUser::err_mess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUser
的用法示例。
在下文中一共展示了CUser::err_mess方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetList
//.........这里部分代码省略.........
* <td></td> </tr> </tbody></table>
*
*
*
* @return CDBResult
*
*
* <h4>Example</h4>
* <pre>
* <?<br>$filter = Array<br>(<br> "ID" => "1 | 2",<br> "TIMESTAMP_1" => "04.02.2004", // в формате текущего сайта<br> "TIMESTAMP_2" => "04.02.2005",<br> "LAST_LOGIN_1" => "01.02.2004",<br> "ACTIVE" => "Y",<br> "LOGIN" => "nessy | admin",<br> "NAME" => "Виталий & Соколов",<br> "EMAIL" => "mail@server.com | mail@server.com",<br> "KEYWORDS" => "www.bitrix.ru",<br> "PERSONAL_PROFESSION" => "системотехник",<br> "PERSONAL_GENDER" => "M",<br> "PERSONAL_COUNTRY" => "4 | 1", // Беларусь или Россия<br> "ADMIN_NOTES" => "\"UID = 145\"",<br> "GROUPS_ID" => Array(1,4,10)<br>);<br>$rsUsers = <b>CUser::GetList</b>(($by="personal_country"), ($order="desc"), $filter); // выбираем пользователей<br>$is_filtered = $rsUsers->is_filtered; // отфильтрована ли выборка ?<br>$rsUsers->NavStart(50); // разбиваем постранично по 50 записей<br>echo $rsUsers->NavPrint(GetMessage("PAGES")); // печатаем постраничную навигацию<br>while($rsUsers->NavNext(true, "f_")) :<br> echo "[".$f_ID."] (".$f_LOGIN.") ".$f_NAME." ".$f_LAST_NAME."<br>"; <br>endwhile;<br>?>
*
* $rsUsers = CUser::GetList(array('sort' => 'asc'), 'sort');$order = array('sort' => 'asc');
* $tmp = 'sort'; // параметр проигнорируется методом, но обязан быть
* $rsUsers = CUser::GetList($order, $tmp);
* </pre>
*
*
*
* <h4>See Also</h4>
* <ul> <li> <a href="http://dev.1c-bitrix.ru/api_help/main/reference/cuser/index.php">Поля CUser</a> </li> <li> <a
* href="http://dev.1c-bitrix.ru/api_help/main/reference/cuser/getbyid.php">CUser::GetByID</a> </li> <li> <a
* href="http://dev.1c-bitrix.ru/api_help/main/reference/cuser/getbylogin.php">CUser::GetByLogin</a> </li> </ul></b<a
* name="examples"></a>
*
*
* @static
* @link http://dev.1c-bitrix.ru/api_help/main/reference/cuser/getlist.php
* @author Bitrix
*/
public static function GetList(&$by, &$order, $arFilter = array(), $arParams = array())
{
/** @global CUserTypeManager $USER_FIELD_MANAGER */
global $DB, $USER_FIELD_MANAGER;
$err_mess = CUser::err_mess() . "<br>Function: GetList<br>Line: ";
if (is_array($by)) {
$bSingleBy = false;
$arOrder = $by;
} else {
$bSingleBy = true;
$arOrder = array($by => $order);
}
static $obUserFieldsSql;
if (!isset($obUserFieldsSql)) {
$obUserFieldsSql = new CUserTypeSQL();
$obUserFieldsSql->SetEntity("USER", "U.ID");
$obUserFieldsSql->obWhere->AddFields(array("F_LAST_NAME" => array("TABLE_ALIAS" => "U", "FIELD_NAME" => "U.LAST_NAME", "MULTIPLE" => "N", "FIELD_TYPE" => "string", "JOIN" => false)));
}
$obUserFieldsSql->SetSelect($arParams["SELECT"]);
$obUserFieldsSql->SetFilter($arFilter);
$obUserFieldsSql->SetOrder($arOrder);
$arFields_m = array("ID", "ACTIVE", "LAST_LOGIN", "LOGIN", "EMAIL", "NAME", "LAST_NAME", "SECOND_NAME", "TIMESTAMP_X", "PERSONAL_BIRTHDAY", "IS_ONLINE");
$arFields = array("DATE_REGISTER", "PERSONAL_PROFESSION", "PERSONAL_WWW", "PERSONAL_ICQ", "PERSONAL_GENDER", "PERSONAL_PHOTO", "PERSONAL_PHONE", "PERSONAL_FAX", "PERSONAL_MOBILE", "PERSONAL_PAGER", "PERSONAL_STREET", "PERSONAL_MAILBOX", "PERSONAL_CITY", "PERSONAL_STATE", "PERSONAL_ZIP", "PERSONAL_COUNTRY", "PERSONAL_NOTES", "WORK_COMPANY", "WORK_DEPARTMENT", "WORK_POSITION", "WORK_WWW", "WORK_PHONE", "WORK_FAX", "WORK_PAGER", "WORK_STREET", "WORK_MAILBOX", "WORK_CITY", "WORK_STATE", "WORK_ZIP", "WORK_COUNTRY", "WORK_PROFILE", "WORK_NOTES", "ADMIN_NOTES", "XML_ID", "LAST_NAME", "SECOND_NAME", "STORED_HASH", "CHECKWORD_TIME", "EXTERNAL_AUTH_ID", "CONFIRM_CODE", "LOGIN_ATTEMPTS", "LAST_ACTIVITY_DATE", "AUTO_TIME_ZONE", "TIME_ZONE", "TIME_ZONE_OFFSET", "PASSWORD", "CHECKWORD", "LID", "TITLE");
$arFields_all = array_merge($arFields_m, $arFields);
$arSelectFields = array();
$online_interval = array_key_exists("ONLINE_INTERVAL", $arParams) && intval($arParams["ONLINE_INTERVAL"]) > 0 ? $arParams["ONLINE_INTERVAL"] : 120;
if (isset($arParams['FIELDS']) && is_array($arParams['FIELDS']) && count($arParams['FIELDS']) > 0 && !in_array("*", $arParams['FIELDS'])) {
foreach ($arParams['FIELDS'] as $field) {
$field = strtoupper($field);
if ($field == 'TIMESTAMP_X') {
$arSelectFields[$field] = $DB->DateToCharFunction("U.TIMESTAMP_X") . " TIMESTAMP_X";
} elseif ($field == 'IS_ONLINE') {
$arSelectFields[$field] = "IF(U.LAST_ACTIVITY_DATE > DATE_SUB(NOW(), INTERVAL " . $online_interval . " SECOND), 'Y', 'N') IS_ONLINE";
} elseif ($field == 'DATE_REGISTER') {
$arSelectFields[$field] = $DB->DateToCharFunction("U.DATE_REGISTER") . " DATE_REGISTER";
} elseif ($field == 'LAST_LOGIN') {
$arSelectFields[$field] = $DB->DateToCharFunction("U.LAST_LOGIN") . " LAST_LOGIN";