Documentation

IsCurrentUserModuleAdmin

bool
CSocNetUser::IsCurrentUserModuleAdmin();
 string site_id = SITE_ID,
 bool bUseSession = true
);

The method checks if current user has administrative access permissions for the social network module. Static method.

Parameters

Parameter Description Available from version
site_id Site ID, optional parameter. Current site is set by default.
bUseSession Parameter, specifying to use the current user authorization session. Optional parameter. True by default.

Returned value

When user is an administrator or has write permissions for the social network module, the method returns true. Otherwise, returns false.

Examples

<?
if (CSocNetUser::IsCurrentUserModuleAdmin())
{
   // Current user has all permissions
}
?>


© «Bitrix24», 2001-2024