Exemple #1
0
def get_user(userId):
    myvar = dict(uid=userId)
    results = db.select("users", myvar, where="userId = $uid")
    if len(results) == 0:
        return None
    else:
        videoList = videos.get_videoList(userId)
        return bigUser.BigUser(results[0], videoList)
Exemple #2
0
def get_user(userId): 
    myvar = dict(uid=userId)
    results = db.select('users', myvar, where="userId = $uid")
    if len(results)==0:
        return None
    else:
        videoList = videos.get_videoList(userId)
        return bigUser.BigUser(results[0], videoList)
Exemple #3
0
def check_userId(userId, passwd):
    myvar = dict(uId=userId, upwd=passwd)
    results = db.select("users", myvar, where="userId = $uId and passwd = $upwd")
    if len(results) > 0:
        temp = results[0]
        videoList = videos.get_videoList(temp["userId"])
        return bigUser.BigUser(temp, videoList)
    else:
        return None
Exemple #4
0
def check_user(userName, passwd):
    myvar = dict(uName=userName, upwd=passwd)
    results = db.select("users", myvar, where="userName = $uName and passwd = $upwd")
    if results is None or len(results) == 0:
        results = db.select("users", myvar, where="mail = $uName and passwd = $upwd")
    if len(results) > 0:
        temp = results[0]
        videoList = videos.get_videoList(temp["userId"])
        return bigUser.BigUser(temp, videoList)
    else:
        return None
Exemple #5
0
def check_user(userName, passwd):
    myvar = dict(uName=userName, upwd=passwd)
    results = db.select('users', myvar, where="userName = $uName and passwd = $upwd")
    if results is None or len(results)==0:
        results = db.select('users', myvar, where="mail = $uName and passwd = $upwd")
    if len(results)>0:
        temp = results[0]
        videoList = videos.get_videoList(temp['userId'])
        return bigUser.BigUser(temp, videoList)
    else:
        return None