User privileges to be used in a if then statement

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sprocker
User
Posts: 38

User privileges to be used in a if then statement

Post by sprocker »

Hi

I have a page that has a section that I would like to show only of the user has Edit or Delete rights.

What is the if ( user can Edit or Delete ) {
echo "this":
}

What do I use in the brackets instead of "user can Edit or Delete"

Thanks
Deb


mobhar
User
Posts: 11741

Post by mobhar »

Simply try this:

if (Security()->CanEdit() || Security()->CanDelete()) {
echo "this";
}


Post Reply