Поддержка серверов

MAIN: методы, функции, константы класса Битрикс


Блог разработчика

9 Августа 2016 ResizeImageGet и простой водяной знак налету

Сегодня поговорим о том как проще всего воткнуть водяной знак на картинки в Битрикс. Например, на все изображения каталога.

21 Июля 2016 Добавление вкладки в CRM коробки Битрикс24

В этом посте я покажу, как легко и просто добавить вкладку в сущность CRM. И не просто добавить, а вывести там свой контент.

21 Июля 2016 Как просто обращаться из коробки Битрикс24 на сайт на базе Битрикс

К примеру вам хочется внутренним скриптом дернуть с сайта-магазина информацию, которая там, в свою очередь, закрыта некоторыми правами. Например, админскими. Можно конечно мутить свой REST, или иной формат общения, но проще всего воспользоваться штатным инструментом:

Список функций и методов модуля main

Метод
CUser::GetParam($name)
CUser::GetSecurityPolicy()
CUser::SetParam($name, $value)
CUser::GetID()
CUser::GetLogin()
CUser::GetEmail()
CUser::GetFullName()
CUser::GetFirstName()
CUser::GetLastName()
CUser::GetSecondName()
CUser::GetFormattedName($bUseBreaks = true, $bHTMLSpec = true)
CUser::GetUserGroupArray()
CUser::SetUserGroupArray($arr)
CUser::GetUserGroupString()
CUser::GetGroups()
CUser::RequiredHTTPAuthBasic($Realm = "Bitrix")
CUser::LoginByCookies()
CUser::LoginByHash($login, $hash)
CUser::LoginByHttpAuth()
CUser::LoginByDigest($arDigest)
CUser::UpdateDigest($ID, $pass)
CUser::LoginHitByHash()
CUser::AddHitAuthHash($url, $user_id = false, $site_id = false)
CUser::GetHitAuthHash($url_mask, $userID = false)
CUser::CleanUpHitAuthAgent()
CUser::UpdateSessionData($id, $applicationId = null)
CUser::Authorize($id, $bSave = false, $bUpdate = true, $applicationId = null)
CUser::GetSessionHash()
CUser::GetPasswordHash($PASSWORD_HASH)
CUser::SavePasswordHash()
CUser::Login($login, $password, $remember="N", $password_original="Y")
CUser::LoginInternal(&$arParams, &$result_message = true, &$applicationId = null, &$applicationPassId = null)
CUser::CheckUsersCount($user_id)
CUser::LoginByOtp($otp, $remember_otp = "N", $captcha_word = "", $captcha_sid = "")
CUser::AuthorizeWithOtp($user_id)
CUser::ChangePassword($LOGIN, $CHECKWORD, $PASSWORD, $CONFIRM_PASSWORD, $SITE_ID=false, $captcha_word = "", $captcha_sid = 0, $authActions = true, $phoneNumber = "")
CUser::GeneratePasswordByPolicy(array $groups)
CUser::CheckPasswordAgainstPolicy($password, $arPolicy)
CUser::SendUserInfo($ID, $SITE_ID, $MSG, $bImmediate=false, $eventName="USER_INFO")
CUser::SendPassword($LOGIN, $EMAIL, $SITE_ID = false, $captcha_word = "", $captcha_sid = 0, $phoneNumber = "")
CUser::Register($USER_LOGIN, $USER_NAME, $USER_LAST_NAME, $USER_PASSWORD, $USER_CONFIRM_PASSWORD, $USER_EMAIL, $SITE_ID = false, $captcha_word = "", $captcha_sid = 0, $bSkipConfirm = false, $USER_PHONE_NUMBER = "")
CUser::SimpleRegister($USER_EMAIL, $SITE_ID = false)
CUser::IsAuthorized()
CUser::HasNoAccess()
CUser::IsJustAuthorized()
CUser::IsJustBecameOnline()
CUser::IsAdmin()
CUser::SetControllerAdmin($isAdmin=true)
CUser::Logout()
CUser::GetUserGroup($ID)
CUser::GetUserGroupEx($ID)
CUser::GetUserGroupList($ID)
CUser::CheckFields(&$arFields, $ID=false)
CUser::CheckInternalFields($arFields, $ID = false)
CUser::GetByID($ID)
CUser::GetByLogin($LOGIN)
CUser::Update($ID, $arFields, $authActions = true)
CUser::SetUserGroup($USER_ID, $arGroups, $newUser = false)
CUser::AppendUserGroup($user_id, $groups)
CUser::GetCount()
CUser::Delete($ID)
CUser::GetExternalAuthList()
CUser::GetGroupPolicy($iUserId)
CUser::CheckStoredHash($iUserId, $sHash, $bTempHashOnly=false)
CUser::GetAllOperations($arGroups = false)
CUser::CanDoOperation($op_name, $user_id = 0)
CUser::GetFileOperations($arPath, $arGroups=false)
CUser::CanDoFileOperation($op_name, $arPath)
CUser::UserTypeRightsCheck($entity_id)
CUser::CanAccess($arCodes)
CUser::GetAccessCodes()
CUser::CleanUpAgent()
CUser::DeactivateAgent()
CUser::UnblockAgent($userId)
CUser::GetActiveUsersCount()
CUser::SetLastActivityDate($userId = null, $cache = false)
CUser::SetLastActivityDateByArray($arUsers, $ip = null)
CUser::GetSecondsForLimitOnline()
CUser::GetExternalUserTypes()
CUser::GetOnlineStatus($userId, $lastseen, $now = false)
CUser::FormatLastActivityDate($timestamp, $now = false)
CUser::SearchUserByName($arName, $email = "", $bLoginMode = false)
CUser::FormatName($NAME_TEMPLATE, $arUser, $bUseLogin = false, $bHTMLSpec = true)
CUser::clearUserGroupCache($ID = false)
CUser::CheckAuthActions()
CUser::AuthActionsCleanUpAgent()
CUser::GeneratePhoneCode($userId)
CUser::VerifyPhoneCode($phoneNumber, $code)
CUser::err_mess()
CUser::Add($arFields)
CUser::GetDropDownList($strSqlSearch="and ACTIVE='Y'", $strSqlOrder="ORDER BY ID, NAME, LAST_NAME")
CUser::GetList(&$by, &$order, $arFilter=Array(), $arParams=Array())
CUser::IsOnLine($id, $interval = null)