• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/security/currentuser.php
  • Класс: BitrixMainSecurityCurrentUser
  • Вызов: CurrentUser::isInGroup
public function isInGroup($groupId)
{
	if (empty($groupId))
		throw new MainArgumentNullException("groupId");
	if (!TypeInt::isInteger($groupId))
		throw new MainArgumentTypeException("groupId", "int");

	$groupId = intval($groupId);
	if ($groupId == 2)
		return true;

	if (!isset($this->userGroups))
		$this->loadUserGroups();

	return in_array($groupId, $this->userGroups);
}