Documentation

GetByID

Description and parameters

array
CSaleUserAccount::GetByID(
 int ID
);

Method returns an associative array with accont parameters with ID. Non-static method.

Call parameters

ParameterDescription
ID Account ID.

Returned values

Method returns an associative array with account parameters with keys:

  • ID - account code;
  • USER_ID - owner-user ID;
  • CURRENT_BUDGET - current amount deposited at the account;
  • CURRENCY - currency;
  • NOTES - text description;
  • LOCKED - flag for locked account;
  • TIMESTAMP_X - date of last update;
  • DATE_LOCKED - date of locked account.

Note: method result is cached within a page, that's why a repeated method call doesn't results in additional database queries.

Examples

<? if ($ar = CSaleUserAccount::GetByID(5)) 
{ echo "At the account ".SaleFormatCurrency($ar["CURRENT_BUDGET"], 
                                      $ar["CURRENCY"]); } ?>


© «Bitrix24», 2001-2024
Up