dddp/accounts/ddp.py
def update(self, selector, update, options=None):
        """Update user data."""
        # we're ignoring the `options` argument at this time
        del options
        user = get_object(
            self.model, selector['_id'],
            pk=this.user_id,
        )
        profile_update = self.deserialize_profile(
            update['$set'], key_prefix='profile.', pop=True,
        )
        if len(update['$set']) != 0:
            raise MeteorError(400, 'Invalid update fields: %r')

        for key, val in profile_update.items():
            setattr(user, key, val)
        user.save()
def update(self, selector, update, options=None):
        # we're ignoring the `options` argument at this time
        del options
        user = get_object(
            self.model, selector['_id'],
            pk=this.user_id,
        )
        profile_update = self.deserialize_profile(
            update['$set'], key_prefix='profile.', pop=True,
        )
        if len(update['$set']) != 0:
            raise MeteorError(400, 'Invalid update fields: %r')

        for key, val in profile_update.items():
            setattr(user, key, val)
        user.save()
def update ( self , selector , update , options = None ) : # we're ignoring the `options` argument at this time del options user = get_object ( self . model , selector [ '_id' ] , pk = this . user_id , ) profile_update = self . deserialize_profile ( update [ '$set' ] , key_prefix = 'profile.' , pop = True , ) if len ( update [ '$set' ] ) != 0 : raise MeteorError ( 400 , 'Invalid update fields: %r' ) for key , val in profile_update . items ( ) : setattr ( user , key , val ) user . save ( )
Update user data.
Update user data .