当前位置: 首页>>代码示例>>PHP>>正文


PHP Groups::removeUserOfGroup方法代码示例

本文整理汇总了PHP中Groups::removeUserOfGroup方法的典型用法代码示例。如果您正苦于以下问题:PHP Groups::removeUserOfGroup方法的具体用法?PHP Groups::removeUserOfGroup怎么用?PHP Groups::removeUserOfGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Groups的用法示例。


在下文中一共展示了Groups::removeUserOfGroup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: removeUserFromGroup

    /**

     * remove user from group

     *

     * @param string $appDocUid

     * @return $result will return an object

     */

    public function removeUserFromGroup ($userId, $groupId)

    {

        try {

            G::LoadClass( 'groups' );

            global $RBAC;



            $RBAC->initRBAC();

            $user = $RBAC->verifyUserId( $userId );



            if ($user == 0) {

                $result = new wsResponse( 3, G::loadTranslation( 'ID_USER_NOT_REGISTERED_SYSTEM' ) );



                return $result;

            }



            $groups = new Groups();

            $very_group = $groups->verifyGroup( $groupId );



            if ($very_group == 0) {

                $result = new wsResponse( 9, G::loadTranslation( 'ID_GROUP_NOT_REGISTERED_SYSTEM' ) );



                return $result;

            }



            $very_user = $groups->verifyUsertoGroup( $groupId, $userId );



            if ($very_user == 1) {

                $oGroup = new Groups();

                $oGroup->removeUserOfGroup( $groupId, $userId );

                $result = new wsResponse( 0, G::loadTranslation( 'ID_COMMAND_EXECUTED_SUCCESSFULY' ) );



                return $result;

            }



            //$oGroup->removeUserOfGroup($_POST['GRP_UID'], $_POST['USR_UID']);

            $result = new wsResponse( 8, G::loadTranslation( 'ID_USER_NOT_REGISTERED_GROUP' ) );



            return $result;

        } catch (Exception $e) {

            $result = new wsResponse( 100, $e->getMessage() );



            return $result;

        }



//.........这里部分代码省略.........
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:class.wsBase.php

示例2: groupRemoveUsers

 public function groupRemoveUsers($groupUid, array $arrayUserUid)
 {
     try {
         $group = new Groups();
         foreach ($arrayUserUid as $value) {
             $userUid = $value;
             $group->removeUserOfGroup($groupUid, $userUid);
         }
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:12,代码来源:ldapadvanced.php

示例3: explode

        break;
    case 'assignUsersToGroupsMultiple':
        $GRP_UID = $_POST['GRP_UID'];
        $uUIDs = explode(',', $_POST['USR_UID']);
        G::LoadClass('groups');
        $oGroup = new Groups();
        foreach ($uUIDs as $USR_UID) {
            $oGroup->addUserToGroup($GRP_UID, $USR_UID);
        }
        break;
    case 'deleteUsersToGroupsMultiple':
        $GRP_UID = $_POST['GRP_UID'];
        $uUIDs = explode(',', $_POST['USR_UID']);
        G::LoadClass('groups');
        $oGroup = new Groups();
        foreach ($uUIDs as $USR_UID) {
            $oGroup->removeUserOfGroup($GRP_UID, $USR_UID);
        }
        break;
    case 'updatePageSize':
        G::LoadClass('configuration');
        $c = new Configurations();
        $arr['pageSize'] = $_REQUEST['size'];
        $arr['dateSave'] = date('Y-m-d H:i:s');
        $config = array();
        $config[] = $arr;
        $c->aConfig = $config;
        $c->saveConfig('groupList', 'pageSize', '', $_SESSION['USER_LOGGED']);
        echo '{success: true}';
        break;
}
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:groups_Ajax.php

示例4: delete

 /**
  * Unassign User of the Group
  *
  * @param string $groupUid Unique id of Group
  * @param string $userUid  Unique id of User
  *
  * return void
  */
 public function delete($groupUid, $userUid)
 {
     try {
         //Verify data
         $process = new \ProcessMaker\BusinessModel\Process();
         $group = new \ProcessMaker\BusinessModel\Group();
         $group->throwExceptionIfNotExistsGroup($groupUid, $this->arrayFieldNameForException["groupUid"]);
         $process->throwExceptionIfNotExistsUser($userUid, $this->arrayFieldNameForException["userUid"]);
         $this->throwExceptionIfNotExistsGroupUser($groupUid, $userUid, $this->arrayFieldNameForException["userUid"]);
         //Delete
         $group = new \Groups();
         $group->removeUserOfGroup($groupUid, $userUid);
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:24,代码来源:User.php


注:本文中的Groups::removeUserOfGroup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。