Deletes registration object from database

            :param register_user: RegisterUser object to delete
763131
def del_register_user(self, register_user):
        
        try:
            self.get_session.delete(register_user)
            self.get_session.commit()
            return True
        except Exception as e:
            log.error(c.LOGMSG_ERR_SEC_DEL_REGISTER_USER.format(str(e)))
            self.get_session.rollback()
            return False
1254151
def delete_user(self, user_descriptor):
        
        route_values = {}
        if user_descriptor is not None:
            route_values['userDescriptor'] = self._serialize.url('user_descriptor', user_descriptor, 'str')
        self._send(http_method='DELETE',
                   location_id='005e26ec-6b77-4e4f-a986-b3827bf241f5',
                   version='5.1-preview.1',
                   route_values=route_values)
969903
def delete_name(name):
    '''  '''
    session = create_session()
    try:
        user = session.query(User).filter_by(name=name).first()
        session.delete(user)
        session.commit()
    except SQLAlchemyError, e:
        session.rollback()
        raise bottle.HTTPError(500, "Database Error", e)
    finally:
        session.close()
1087377
def delete(self):
        
        resp = self.r_session.delete(self.database_url)
        resp.raise_for_status()
535448
def remove_user(self, username):
        

        sql = '''DELETE FROM user WHERE username = ?'''
        try:
            self._db_curs.execute(sql, (username, ))
            self._db_conn.commit()
        except (sqlite3.OperationalError, sqlite3.IntegrityError) as error:
            raise AuthError(error)
        return self._db_curs.rowcount
655695
def delete_user_action(model, request):
    
    try:
        users = model.parent.backend
        uid = model.model.name
        del users[uid]
        users()
        model.parent.invalidate()
        localizer = get_localizer(request)
        message = localizer.translate(_(
            'delete_user_from_database',
            default="Deleted user '${uid}' from database.",
            mapping={'uid': uid}
        ))
        return {
            'success': True,
            'message': message
        }
    except Exception as e:
        return {
            'success': False,
            'message': str(e)
        }
522955
private function unregister() {
        if ($this->db) {
            $this->db->recordset_closed($this);
            $this->db = null;
        }
    }
1288861
def unregister(self, uuid):
        
        schema = self._schbyuuid.pop(uuid)

        # clean schemas by name
        self._schbyname[schema.name].remove(schema)
        if not self._schbyname[schema.name]:
            del self._schbyname[schema.name]
342999
public function deleteUser($user)
    {

        $sql = "DELETE FROM {$this->dbTableNamePrefix}" . DataConnector::USER_RESULT_TABLE_NAME . ' ' .
               'WHERE (user_pk = :id)';
        $query = $this->db->prepare($sql);
        $query->bindValue('id', $user->getRecordId(), PDO::PARAM_INT);
        $ok = $query->execute();

        if ($ok) {
            $user->initialize();
        }

        return $ok;

    }
501421
def unregister_model(self, model):
        
        if model not in self._model_registry:
            raise NotRegistered('The model %s is not registered' % model)

        del self._model_registry[model]
1342877
def drop_user(self, name):
        
        statement = ddl.DropUser(name)
        self._execute(statement)
397466
def unregister(self, filter_name):
        
        if filter_name in self.filter_list:
            self.filter_list.pop(filter_name)
475156
def unregister(self, name):
        
        try:
            name = name.name
        except AttributeError:
            pass
        return self.pop(name,None)
1010339
def remove_listener(self, registration_id):
        
        try:
            self._listeners.pop(registration_id)
            return True
        except KeyError:
            return False
1063235
def remove_member(self, user):
        
        username = Transform.to_user(user)
        extra = {
            'resource': self.__class__.__name__,
            'query': {
                'id': self.id,
                'user': user,
            }
        }
        logger.info('Removing member', extra=extra)
        self._api.delete(
            url=self._URL['member'].format(id=self.id, username=username)
        )
1015531
def remove_from_user(self, name, *args):
        
        user = self.get_user(name=name)
        attrs_ = user['user']
        for a in args:
            del attrs_[a]
688133
public function deleteUserRegistrations(User $user, array $collections)
    {
        $qb = $this->repository->createQueryBuilder('d');
        $qb->delete('Phraseanet:Registration', 'd');
        $qb->where($qb->expr()->eq('d.user', ':user'));
        $qb->setParameter(':user', $user->getId());

        if (count($collections) > 0) {
            $qb->andWhere('d.baseId IN (:bases)');
            $qb->setParameter(':bases', array_map(function ($collection) {
                return $collection->get_base_id();
            }, $collections));
        }

        return $qb->getQuery()->execute();
    }