Documentation

PreparePath

string
CBlogUser::PreparePath(
 int    userID,
 string siteID = false,
 bool   is404 = true,
);

The method returns path to profile of the user with userID relative to site root with siteID with account of public section (with or without the 404 error handler). Static method.

Method parameters

ParameterDescription
userID Site user ID. Optional parameter. By default value - 0.
siteID Site ID.
Optional. By default false - current site is sourced.
is404 Specifies, whether 404 error handler is used in the public section.
Optional. By default true - public section of blogs works on the basis of 404 error handler.

Returned value

Returns path to user profile relative to site root.

Examples of use

<?
echo '<a href="'.CBlogUser::PreparePath($USER->GetID()).'">Your profile</a>';
?>


© «Bitrix24», 2001-2024
Up