/** * @param $userId * @param $currency * @return float|null */ public static function getUserBudget($userId, $currency) { $budget = null; if ($userAccount = \CSaleUserAccount::GetByUserId($userId, $currency)) { if ($userAccount['LOCKED'] != 'Y') { $budget = floatval($userAccount['CURRENT_BUDGET']); } } return $budget; }