def setUser(self, *args, **kwargs):
try:<EOL><INDENT>user = self.mambuuserclass(entid=self['<STR_LIT>'], *args, **kwargs)<EOL><DEDENT>except KeyError as kerr:<EOL><INDENT>err = MambuError("<STR_LIT>" % self['<STR_LIT:id>'])<EOL>err.noUser = True<EOL>raise err<EOL><DEDENT>except AttributeError as ae:<EOL><INDENT>from .mambuuser import MambuUser<EOL>self.mambuuserclass = MambuUser<EOL>try:<EOL><INDENT>user = self.mambuuserclass(entid=self['<STR_LIT>'], *args, **kwargs)<EOL><DEDENT>except KeyError as kerr:<EOL><INDENT>err = MambuError("<STR_LIT>" % self['<STR_LIT:id>'])<EOL>err.noUser = True<EOL>raise err<EOL><DEDENT><DEDENT>self['<STR_LIT:user>'] = user<EOL>return <NUM_LIT:1><EOL>
Adds the user for this loan to a 'user' field.

        User is a MambuUser object.

        Returns the number of requests done to Mambu.