Documentation

CanUserCreateBlog

bool
CBlog::CanUserCreateBlog(
 int userID = 0
);

The method verifies whether the userID can create and operate a blog. Non-static method.

Method parameters

ParameterDescription
userID User ID. Optional. By default, verification is performed for the current user.

Returned value

The method returns true If the user has the access permission to create a blog, otherwise returns false.

See Also

Examples of use

<?
if(CBlog::CanUserCreateBlog($USER->GetID())
    echo "You can create and operate a blog.";
else
    echo "You cannot create and operate a blog.";
?>


© «Bitrix24», 2001-2024
Up