判断某个用户是否属于某个组

public static boolean isIncludesInUserGroup(userID _userid,userGroupID _UserGroup)
{
        userGroupList userGroupList;
        boolean       ret;
        ;

        select firstonly groupId from userGroupList
             where userGroupList.userId == _userID && userGrouplist.groupId==_userGroup;
        if (userGroupList.userId!='')
            ret=true;
        else
            ret=false;

        return ret;
}

 

 

或者:

UserInfoHelp::userInUserGroup(curuserid(),'Admin')

posted @ 2011-12-21 15:35  perock  阅读(351)  评论(0编辑  收藏  举报