Example #1
0
def createUser():
    try:
        rInfo=Registion.popRegistQueue()
        if rInfo==None:
            return True
        #{"username":username,"password":password,"info":info}
        cellphone = rInfo["username"]
        objectId=User.createUser(cellphone, rInfo["password"], rInfo["info"])
        code = SecurityModule.Registion.generateCode(cellphone)
        sms.send(cellphone, "[C.M.O]动态六位编码 %s"%code)
    except:
        print sys.exc_info()
    return True
Example #2
0
File: User.py Project: drxbate/M1
 def getUserInfo(self):
     userInfo = User.getUserInfo("test")
     self.assertTrue(True, userInfo)
Example #3
0
File: User.py Project: drxbate/M1
 def createUser(self):
     objectid= User.createUser("13524157392", "123456")
     print objectid
     self.assertTrue(True, objectid)
     pass
Example #4
0
def main():
    objid = User.createUser("admin", "admin")
    Security.set_right(objid, [security.Role("admin",1)])
Example #5
0
def create_domains():
    objid = User.add_root_domain(domain="<root>")
    Settings.accounts["root_domain_id"] = str(objid)
    Settings.save()