Removes membership entities related to current user.
776880
private void removeMemberships(Node userNode, boolean broadcast) throws RepositoryException
   {
      PropertyIterator refUserProps = userNode.getReferences();
      while (refUserProps.hasNext())
      {
         Node refUserNode = refUserProps.nextProperty().getParent();
         refUserNode.remove();
      }
   }
661819
public function removeme()
    {
        // existing user ?
        $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        if ($oUser->load(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('uid'))) {
            $oUser->getNewsSubscription()->setOptInStatus(0);

            // removing from group ..
            $oUser->removeFromGroup('oxidnewsletter');

            $this->_iNewsletterStatus = 3;
        }
    }
646908
def cleanup_relations(self):
        """"""
        collections = self.collections
        for relation in [x for col in collections.values()
                         for x in col.model.relations.values()]:
            db.session.query(relation)\
                       .filter(~relation.listing.any())\
                       .delete(synchronize_session=False)
        db.session.commit()
300474
public function uninstall_cleanup() {
        global $DB, $CFG;

        // NOTE: this is a bit brute force way - it will not trigger events and hooks properly.

        // Nuke all role assignments.
        role_unassign_all(array('component'=>'enrol_'.$this->name));

        // Purge participants.
        $DB->delete_records_select('user_enrolments', "enrolid IN (SELECT id FROM {enrol} WHERE enrol = ?)", array($this->name));

        // Purge enrol instances.
        $DB->delete_records('enrol', array('enrol'=>$this->name));

        // Tweak enrol settings.
        if (!empty($CFG->enrol_plugins_enabled)) {
            $enabledenrols = explode(',', $CFG->enrol_plugins_enabled);
            $enabledenrols = array_unique($enabledenrols);
            $enabledenrols = array_flip($enabledenrols);
            unset($enabledenrols[$this->name]);
            $enabledenrols = array_flip($enabledenrols);
            if (is_array($enabledenrols)) {
                set_config('enrol_plugins_enabled', implode(',', $enabledenrols));
            }
        }

        parent::uninstall_cleanup();
    }
1098758
def delete(self):
        """"""
        pipeline = self.db.pipeline()
        self._delete_from_indices(pipeline)
        self._delete_membership(pipeline)
        pipeline.delete(self.key())
        pipeline.execute()
1073375
def remove_user(self, user, **kwargs):
        """"""
        if isinstance(user, Entity):
            user = user['id']

        assert isinstance(user, six.string_types)

        endpoint = '{0}/{1}/users/{2}'.format(
            self.endpoint,
            self['id'],
            user,
        )
        return self.request('DELETE', endpoint=endpoint, query_params=kwargs)
1091880
def remove(self, member):
        
        if not self.client.srem(self.name, member):
            raise KeyError(member)
1020668
private void removeFromCache(Membership membership)
   {
      cache.remove(cache.getMembershipKey(membership), CacheType.MEMBERSHIP);
   }
1164355
def remove(self, cls, originalMemberNameList, classNamingConvention):
        
        self._memberDelegate.remove(cls = cls,
                                    originalMemberNameList = originalMemberNameList,
                                    memberName = self._memberName,
                                    classNamingConvention = classNamingConvention)
1136982
def remove_list_members(self, screen_name=None, user_id=None, slug=None,
                            list_id=None, owner_id=None, owner_screen_name=None):
        
        return self._remove_list_members(list_to_csv(screen_name),
                                         list_to_csv(user_id),
                                         slug, list_id, owner_id,
                                         owner_screen_name)
1194894
def delete(self) :
        """"""
        if not self.URL :
            raise CreationError("Please save user first", None, None)

        r = self.connection.session.delete(self.URL)
        if r.status_code < 200 or r.status_code > 202 :
            raise DeletionError("Unable to delete user, url: %s, status: %s" %(r.url, r.status_code), r.content )

        self.URL = None
275730
def remove(self, cls, originalMemberNameList, memberName, classNamingConvention):
        
        accessorDict = self._accessorDict(memberName, classNamingConvention)
        for accessorName, _ in accessorDict.items():
            if accessorName not in originalMemberNameList and hasattr(cls, accessorName):
                delattr(cls, accessorName)
1343844
def prj_remove_user(self, *args, **kwargs):
        
        if not self.cur_prj:
            return
        i = self.prj_user_tablev.currentIndex()
        item = i.internalPointer()
        if item:
            user = item.internal_data()
            log.debug("Removing user %s.", user.username)
            item.set_parent(None)
            self.cur_prj.users.remove(user)
1015531
def remove_from_user(self, name, *args):
        
        user = self.get_user(name=name)
        attrs_ = user['user']
        for a in args:
            del attrs_[a]
297713
@Deprecated
    public static void clear() {
        if (ExtensionList.lookup(AllUsers.class).isEmpty()) {
            return;
        }
        UserIdMapper.getInstance().clear();
        AllUsers.clear();
    }
71738
private void removeMemberships(Node membershipTypeNode) throws Exception
   {
      PropertyIterator refTypes = membershipTypeNode.getReferences();
      while (refTypes.hasNext())
      {
         Property refTypeProp = refTypes.nextProperty();

         Node refTypeNode = refTypeProp.getParent();
         Node refUserNode = refTypeNode.getParent();

         membershipHandler.removeMembership(refUserNode, refTypeNode);
      }
   }
219714
def remove_perm(perm, user_or_group, forum=None):
    
    user, group = get_identity(user_or_group)
    perm = ForumPermission.objects.get(codename=perm)
    if user:
        UserForumPermission.objects.filter(
            forum=forum,
            permission=perm,
            user=user if not user.is_anonymous else None,
            anonymous_user=user.is_anonymous,
        ).delete()
    if group:
        GroupForumPermission.objects.filter(forum=forum, permission=perm, group=group).delete()