Performs an LDAP modify.
181686
def modify(dn, attributes)
      if attributes.kind_of?(Hash)
        attributes = normalize_attributes(attributes)
      else
        attributes = attributes.map do |(action, key, values)|
          [action, Ldaptic.encode(key), values.respond_to?(:before_type_cast) ? values.before_type_cast : [values].flatten.compact]
        end
      end
      log_dispatch(:modify, dn, attributes)
      adapter.modify(dn, attributes) unless attributes.empty?
    end
400559
function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters ) {
        switch ($operatorName)
        {
            case 'xhprof_start':
                eZXHProfLogger::start( $namedParameters['flags'], $namedParameters['options'] );
                $operatorValue = null;
                break;
            case 'xhprof_stop':
                eZXHProfLogger::stop( $namedParameters['dosave'] );
                $operatorValue = null;
                break;
            case 'record_value':
                eZPerfLogger::recordValue( $namedParameters['name'], $operatorValue );
                $operatorValue = null;
                break;
            case 'make_global':
                /// @todo investigate: shal we use copy if $operatorValue is an object?
                $GLOBALS[$namedParameters['name']] = $namedParameters['value'];
                $operatorValue = null;
        }
    }
1354597
private static void updateLibertyServer() throws Exception {
        ServerConfiguration server = emptyConfiguration.clone();

        LdapRegistry ldap = new LdapRegistry();
        ldap.setId("ldap1");
        ldap.setRealm("LDAPRealm");
        ldap.setHost("localhost");
        ldap.setPort(String.valueOf(ds.getListenPort()));
        ldap.setBaseDN(SUB_DN);
        ldap.setBindDN(InMemoryLDAPServer.getBindDN());
        ldap.setBindPassword(InMemoryLDAPServer.getBindPassword());
        ldap.setLdapType("Custom");
        LdapEntityType type1 = new LdapEntityType("Group", null, new String[] { "groupOfNames" }, new String[] { GROUP_BASE_DN });
        LdapEntityType type2 = new LdapEntityType("PersonAccount", null, new String[] { "inetOrgPerson" }, new String[] { USER_BASE_DN });
        ldap.getLdapEntityTypes().add(type1);
        ldap.getLdapEntityTypes().add(type2);

        LDAPFatUtils.createFederatedRepository(server, "LDAPRealmFed", new String[] { SUB_DN });

        server.getLdapRegistries().add(ldap);

        updateConfigDynamically(libertyServer, server);
    }
1364607
@RequestMapping(value = "ldap-mapping/{id}/update", method = RequestMethod.PUT)
    public LDAPMapping updateMapping(@PathVariable ID id, @RequestBody AccountGroupMappingInput input) {
        securityService.checkGlobalFunction(AccountGroupManagement.class);
        return LDAPMapping.of(accountGroupMappingService.updateMapping(
                LDAPExtensionFeature.LDAP_GROUP_MAPPING,
                id,
                input
        ));
    }
801819
public function modifyBatch($dn, array $entry)
    {
        if ($this->suppressErrors) {
            return @ldap_modify_batch($this->getConnection(), $dn, $entry);
        }

        return ldap_modify_batch($this->getConnection(), $dn, $entry);
    }
115900
def modify(self, **params):
        """"""
        data = self.api_client.update_account(self.id, **params)
        self.update(data)
        return data
899692
def modify_user(self, username, attribute, value):
        

        cmd = "userManager.cgi?action=modifyUser&name={0}".format(
            username)

        if attribute.lower() == "group":
            cmd += "&user.Group=%s" % value.lower()

        elif attribute.lower() == "sharable":
            cmd += "&user.Sharable=%s" % value.lower()

        elif attribute.lower() == "reserved":
            cmd += "&user.Reserved=%s" % value.lower()

        elif attribute == "memo":
            cmd += "&user.Memo=%s" % value.lower()

        ret = self.command(cmd)
        return ret.content.decode('utf-8')
444076
def modify_init(uid, data_dic):
        '''
        
        '''
        postinfo = MPost.get_by_uid(uid)
        entry = TabPost.update(
            time_update=tools.timestamp(),
            date=datetime.now(),
            kind=data_dic['kind'] if 'kind' in data_dic else postinfo.kind,
            keywords=data_dic['keywords'] if 'keywords' in data_dic else postinfo.keywords,
        ).where(TabPost.uid == uid)
        entry.execute()
        return uid
969223
def alter(data, system):
    """"""
    device = data[0]
    action = data[1]
    if data[2] == '*':
        data[2] = '.*'
    regex = re.compile(data[2])
    prop = data[3]
    value = float(data[4])
    if action == 'MUL':
        for item in range(system.__dict__[device].n):
            if regex.search(system.__dict__[device].name[item]):
                system.__dict__[device].__dict__[prop][item] *= value
    elif action == 'REP':
        for item in range(system.__dict__[device].n):
            if regex.search(system.__dict__[device].name[item]):
                system.__dict__[device].__dict__[prop][item] = value
    elif action == 'DIV':
        if not value:
            return
        for item in range(system.__dict__[device].n):
            if regex.search(system.__dict__[device].name[item]):
                system.__dict__[device].__dict__[prop][item] /= value
    elif action == 'SUM':
        for item in range(system.__dict__[device].n):
            if regex.search(system.__dict__[device].name[item]):
                system.__dict__[device].__dict__[prop][item] += value
    elif action == 'SUB':
        for item in range(system.__dict__[device].n):
            if regex.search(system.__dict__[device].name[item]):
                system.__dict__[device].__dict__[prop][item] -= value
    elif action == 'POW':
        for item in range(system.__dict__[device].n):
            if regex.search(system.__dict__[device].name[item]):
                system.__dict__[device].__dict__[prop][item] **= value
    else:
        print('ALTER action <%s> is not defined', action)
92174
public function sync()
    {
        $service = Injector::inst()->get(LDAPService::class);
        if (!$service->enabled() ||
            !$this->owner->GUID
        ) {
            return;
        }
        $service->updateLDAPFromMember($this->owner);
        $service->updateLDAPGroupsForMember($this->owner);
    }
736229
protected function _modify()
    {
        $this->_table->alter(
            'MODIFY ' .
            $this->_database->prepareIdentifier($this->_name) .
            ' ' .
            $this->getDefinition()
        );
    }
1315279
def remove_user(config, group, username):
        """"""
        client = Client()
        client.prepare_connection()
        group_api = API(client)
        try:
            group_api.remove_user(group, username)
        except ldap_tools.exceptions.NoGroupsFound:  # pragma: no cover
            print("Group ({}) not found".format(group))
        except ldap_tools.exceptions.TooManyResults:  # pragma: no cover
            print("Query for group ({}) returned multiple results.".format(
                group))
        except ldap3.NO_SUCH_ATTRIBUTE:  # pragma: no cover
            print("{} does not exist in {}".format(username, group))
713441
def query_as_ldap(query, compiler, connection):
    """"""
    if query.is_empty():
        return

    if query.model._meta.model_name == 'migration' and not hasattr(query.model, 'object_classes'):
        # FIXME(rbarrois): Support migrations
        return

    # FIXME(rbarrois): this could be an extra Where clause
    filterstr = ''.join(['(objectClass=%s)' % cls for cls in
                         query.model.object_classes])

    # FIXME(rbarrois): Remove this code as part of #101
    if (len(query.where.children) == 1
            and not isinstance(query.where.children[0], WhereNode)
            and query.where.children[0].lhs.target.column == 'dn'):

        lookup = query.where.children[0]
        if lookup.lookup_name != 'exact':
            raise LdapDBError("Unsupported dn lookup: %s" % lookup.lookup_name)

        return LdapLookup(
            base=lookup.rhs,
            scope=ldap.SCOPE_BASE,
            filterstr='(&%s)' % filterstr,
        )

    sql, params = compiler.compile(query.where)
    if sql:
        filterstr += '(%s)' % (sql % tuple(escape_ldap_filter(param) for param in params))
    return LdapLookup(
        base=query.model.base_dn,
        scope=query.model.search_scope,
        filterstr='(&%s)' % filterstr,
    )
796446
def modify(self, modification, parameters):
        
        for src in self:
            src.modify(modification, parameters)
576158
def modifyPdpContextAccept():
    """"""
    a = TpPd(pd=0x8)
    b = MessageType(mesType=0x45)  # 01000101
    packet = a / b
    return packet
113510
def modify(self, sort=None, purge=False, done=None, undone=None):
        
        self.model.modifyInPlace(
            sort=self._getPattern(sort),
            purge=purge,
            done=self._getDone(done, undone)
        )
621510
public function removeMembers()
    {
        $mod = $this->newBatchModification(
            $this->schema->member(),
            LDAP_MODIFY_BATCH_REMOVE_ALL
        );

        return $this->addModification($mod)->save();
    }