Пример #1
0
 def addAccount(self, eName, ePassword):
     self.emp = Employee(eName, ePassword)
     if GoogleFireBase.find_player(self.db, self.emp) == None:
         GoogleFireBase.set_employee(self.db, self.emp)
     else:
         self.emp = None
         print("Username already exists.\n")
Пример #2
0
    def signIn(self, eName, ePassword):
        self.emp = Employee(eName, ePassword)
        tempEmp = GoogleFireBase.find_player(self.db, self.emp)
        tempEmp = Employee(tempEmp["name"], tempEmp["password"],
                           tempEmp["isClockedIn"])
        if tempEmp != None:
            if tempEmp.password == ePassword:
                self.emp = tempEmp
            else:
                self.emp = None
                print("Incorrect/Password username.\n")

        else:
            self.emp = None
            print("Incorrect/Password username.\n")