Bitrix Site Manager

CAdvContract::GetContractPermissionArray

text
CAdvContract::GetContractPermissionArray(
 int CONTRACT_ID
);

The method GetContractPermissionArray returns permissions of all users for a specified contract.

Parameters

CONTRACT_ID
Contract ID

Example

The following is an example of an array returned by the method.

Array
(
    [VIEW] => Array
        (
            [0] => Array
                (
                    [USER_ID] => 341
                    [USER_LOGIN] => view
                    [USER_NAME] => John
                    [USER_LAST_NAME] => Smith
                    [USER_EMAIL] => view@bitrix.com
                )

            [1] => Array
                (
                    [USER_ID] => 340
                    [USER_LOGIN] => edit
                    [USER_NAME] => Lisa
                    [USER_LAST_NAME] => Brown
                    [USER_EMAIL] => edit@bitrix.com
                )

            [2] => Array
                (
                    [USER_ID] => 2
                    [USER_LOGIN] => nessy
                    [USER_NAME] => Vitaly
                    [USER_LAST_NAME] => Kaplich
                    [USER_EMAIL] => nessy@bitrix.com
                )

        )

    [ADD] => Array
        (
            [0] => Array
                (
                    [USER_ID] => 342
                    [USER_LOGIN] => add
                    [USER_NAME] => David
                    [USER_LAST_NAME] => Gahan
                    [USER_EMAIL] => add@bitrix.com
                )

            [1] => Array
                (
                    [USER_ID] => 340
                    [USER_LOGIN] => edit
                    [USER_NAME] => Lisa
                    [USER_LAST_NAME] => Brown
                    [USER_EMAIL] => edit@bitrix.com
                )

            [2] => Array
                (
                    [USER_ID] => 2
                    [USER_LOGIN] => nessy
                    [USER_NAME] => Vitaly
                    [USER_LAST_NAME] => Kaplich
                    [USER_EMAIL] => nessy@bitrix.com
                )

        )

    [EDIT] => Array
        (
            [0] => Array
                (
                    [USER_ID] => 340
                    [USER_LOGIN] => edit
                    [USER_NAME] => Lisa
                    [USER_LAST_NAME] => Brown
                    [USER_EMAIL] => edit@bitrix.com
                )

            [1] => Array
                (
                    [USER_ID] => 2
                    [USER_LOGIN] => nessy
                    [USER_NAME] => Vitaly
                    [USER_LAST_NAME] => Kaplich
                    [USER_EMAIL] => nessy@bitrix.com
                )

        )

)