bool CCourse::IsHaveCourse( string MIN_PERMISSION = "W" );
The IsHaveCourse method defines whether a current user has the minimum specified access permission to at least one course.
Parameter | Description |
---|---|
MIN_PERMISSION | Minimum access permission. "W" (write) by default. |
The method returns true if a user is entitled to access at least one course, or false otherwise.
<? if (CCourse::IsHaveCourse($MIN_PERMISSION = "W")) { echo "You are a teacher!"; } else { echo "Access denied!"; } ?>
© 2001-2007 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |