#NEWLINE# def createUser( self , login , password , firstName , lastName , email , admin = False , public = True ) : #NEWLINE# #INDENT# '\n        Create a new user with the given information. The user will be created\n        with the default "Public" and "Private" folders.\n\n        :param admin: Whether user is global administrator.\n        :type admin: bool\n        :param public: Whether user is publicly visible.\n        :type public: bool\n        :returns: The user document that was created.\n        ' #NEWLINE# user = { #NEWLINE# #INDENT# 'login' : login , #NEWLINE# 'email' : email , #NEWLINE# 'firstName' : firstName , #NEWLINE# 'lastName' : lastName , #NEWLINE# 'created' : datetime . datetime . utcnow ( ) , #NEWLINE# 'emailVerified' : False , #NEWLINE# 'admin' : admin , #NEWLINE# 'size' : 0 , #NEWLINE# 'groups' : [ ] , #NEWLINE# 'groupInvites' : [ ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . setPassword ( user , password , save = False ) #NEWLINE# self . setPublic ( user , public , save = False ) #NEWLINE# return self . save ( user )