Documentation

CanUserEditPost

bool
CBlogPost::CanUserEditPost(
 int ID,
 int userID
);

The method verifies whether userID can modify a blog post with ID. Non-static method.

Method parameters

ParameterDescription
ID Blog post ID.
userID User ID.

Returned value

The method returns true if the user can modify the blog post, otherwise returns false.

See Also

Examples of use

<?
if(CBlogPost::CanUserEditPost(1, $USER->GetID()))
    echo "You can update the blog post.";
else
    echo "You cannot update the blog post.";
?>


© «Bitrix24», 2001-2024
Up