• Модуль: xdimport
  • Путь к файлу: ~/bitrix/modules/xdimport/classes/general/user.php
  • Класс: CXDIUser
  • Вызов: CXDIUser::DeleteByUserID
function DeleteByUserID($UserID)
{
	global $DB;

	$strSql = "
		DELETE
		FROM b_xdi_user_right
		WHERE USER_ID = ".intval($UserID)."
	";

	$res = $DB->Query($strSql);
	if(is_object($res))
		return true;
	else
	{
		$e = $APPLICATION->GetException();
		$strError = GetMessage("LFP_CLASS_USER_DELETE_ERROR", array("#error_msg#" => is_object($e)? $e->GetString(): ''));
	}

	$APPLICATION->ResetException();
	$e = new CApplicationException($strError);
	$APPLICATION->ThrowException($e);
	return false;
}