function group_del_user($group,$user){

        //find the parent dn
        $group_info=$this->group_info($group,array("cn"));
        if ($group_info[0]["dn"]==NULL){ return (false); }
        $group_dn=$group_info[0]["dn"];
        
        //find the child dn
        $user_info=$this->user_info($user,array("cn"));
        if ($user_info[0]["dn"]==NULL){ return (false); }
        $user_dn=$user_info[0]["dn"];

        $del=array();
        $del["member"] = $user_dn;
        
        $result=@ldap_mod_del($this->_conn,$group_dn,$del);
        if ($result==false){ return (false); }
        return (true);
    }
function group_del_user($group,$user){

        //find the parent dn
        $group_info=$this->group_info($group,array("cn"));
        if ($group_info[0]["dn"]==NULL){ return (false); }
        $group_dn=$group_info[0]["dn"];
        
        //find the child dn
        $user_info=$this->user_info($user,array("cn"));
        if ($user_info[0]["dn"]==NULL){ return (false); }
        $user_dn=$user_info[0]["dn"];

        $del=array();
        $del["member"] = $user_dn;
        
        $result=@ldap_mod_del($this->_conn,$group_dn,$del);
        if ($result==false){ return (false); }
        return (true);
    }
function group_del_user ( $ group , $ user ) { //find the parent dn $ group_info = $ this -> group_info ( $ group , array ( "cn" ) ) ; if ( $ group_info [ 0 ] [ "dn" ] == NULL ) { return ( false ) ; } $ group_dn = $ group_info [ 0 ] [ "dn" ] ; //find the child dn $ user_info = $ this -> user_info ( $ user , array ( "cn" ) ) ; if ( $ user_info [ 0 ] [ "dn" ] == NULL ) { return ( false ) ; } $ user_dn = $ user_info [ 0 ] [ "dn" ] ; $ del = array ( ) ; $ del [ "member" ] = $ user_dn ; $ result = @ ldap_mod_del ( $ this -> _conn , $ group_dn , $ del ) ; if ( $ result == false ) { return ( false ) ; } return ( true ) ; }
Remove a user from a group
Remove a user from a group