예제 #1
0
파일: mtools.py 프로젝트: cloveses/easy_cms
def ch_pw(oid,name,opw,npw):
    opw = make_pw(name,opw)
    ou = OrdUser.objects(id=ObjectId(oid)).filter(password=opw)
    if ou:
        ou = ou.first()
        ou.password = make_pw(name,npw)
        ou.save()
        return True
    return False
예제 #2
0
def ch_pw(oid, name, opw, npw):
    opw = make_pw(name, opw)
    ou = OrdUser.objects(id=ObjectId(oid)).filter(password=opw)
    if ou:
        ou = ou.first()
        ou.password = make_pw(name, npw)
        ou.save()
        return True
    return False
예제 #3
0
파일: mtools.py 프로젝트: cloveses/easy_cms
def reg_user(name,password):
    password = make_pw(name,password)
    ou = OrdUser()
    ou.name = name
    ou.password = password
    ou.save()
    return ou
예제 #4
0
def reg_user(name, password):
    password = make_pw(name, password)
    ou = OrdUser()
    ou.name = name
    ou.password = password
    ou.save()
    return ou
예제 #5
0
파일: mtools.py 프로젝트: cloveses/easy_cms
def login(name,password):
    password = make_pw(name,password)
    res = OrdUser.objects(name=name).filter(password=password)
    if res:
        return res.first()
    return False
예제 #6
0
def login(name, password):
    password = make_pw(name, password)
    res = OrdUser.objects(name=name).filter(password=password)
    if res:
        return res.first()
    return False