本文整理匯總了Python中DatabaseController.getAccountPasswordBasedOnPersonIdAndType方法的典型用法代碼示例。如果您正苦於以下問題:Python DatabaseController.getAccountPasswordBasedOnPersonIdAndType方法的具體用法?Python DatabaseController.getAccountPasswordBasedOnPersonIdAndType怎麽用?Python DatabaseController.getAccountPasswordBasedOnPersonIdAndType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DatabaseController
的用法示例。
在下文中一共展示了DatabaseController.getAccountPasswordBasedOnPersonIdAndType方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: checkIfCurrentPersonPasswordIsCorrect
# 需要導入模塊: import DatabaseController [as 別名]
# 或者: from DatabaseController import getAccountPasswordBasedOnPersonIdAndType [as 別名]
def checkIfCurrentPersonPasswordIsCorrect(personId, accountType, currentPassword):
accountPasswordRecord = DatabaseController.getAccountPasswordBasedOnPersonIdAndType(personId, accountType)
accountPassword = accountPasswordRecord[0][0]
if currentPassword == accountPassword:
return True
else:
return False
示例2: getStudentAccountsList
# 需要導入模塊: import DatabaseController [as 別名]
# 或者: from DatabaseController import getAccountPasswordBasedOnPersonIdAndType [as 別名]
def getStudentAccountsList(schoolId, firstName, surname):
listOfStudentAccounts = []
listOfStudentRecords = DatabaseController.getStudentAccountsList(schoolId, firstName, surname)
for eachRecord in listOfStudentRecords:
for index in range(0, eachRecord.__len__()):
listOfStudentAccounts.append(eachRecord[index])
currentPersonId = int(eachRecord[0])
accountPasswordRecord = DatabaseController.getAccountPasswordBasedOnPersonIdAndType(currentPersonId, accountTypes[2])
if accountPasswordRecord.__len__() > 0:
listOfStudentAccounts.append(accountPasswordRecord[0][0])
listOfStudentAccounts.append(True)
else:
listOfStudentAccounts.append("")
listOfStudentAccounts.append(False)
return listOfStudentAccounts