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)
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)
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
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
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