Documentation

CanUserDeletePost

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

The method verifies whether userID can delete the 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 delete a blog post, otherwise returns false.

See Also

Examples of use

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


© «Bitrix24», 2001-2023
Up