biometric_attendance/biometric_attendance/zk/base.py
def delete_user(self, uid=0, user_id=''):
        """
        delete specific user by uid or user_id

        :param uid: user ID that are generated from device
        :param user_id: your own user ID
        :return: bool
        """
        if not uid:
            users = self.get_users()
            users = list(filter(lambda x: x.user_id==str(user_id), users))
            if not users:
                return False
            uid = users[0].uid
        command = const.CMD_DELETE_USER
        command_string = pack('h', uid)
        cmd_response = self.__send_command(command, command_string)
        if not cmd_response.get('status'):
            raise ZKErrorResponse("Can't delete user")
        self.refresh_data()
        if uid == (self.next_uid - 1):
            self.next_uid = uid

        delete specific user by uid or user_id

        :param uid: user ID that are generated from device
        :param user_id: your own user ID
        :return: bool
        
delete specific user by uid or user_id
delete specific user by uid or user_id
def delete_user(self, uid=0, user_id=''):
        if not uid:
            users = self.get_users()
            users = list(filter(lambda x: x.user_id==str(user_id), users))
            if not users:
                return False
            uid = users[0].uid
        command = const.CMD_DELETE_USER
        command_string = pack('h', uid)
        cmd_response = self.__send_command(command, command_string)
        if not cmd_response.get('status'):
            raise ZKErrorResponse("Can't delete user")
        self.refresh_data()
        if uid == (self.next_uid - 1):
            self.next_uid = uid
def delete_user ( self , uid = 0 , user_id = '' ) : if not uid : users = self . get_users ( ) users = list ( filter ( lambda x : x . user_id == str ( user_id ) , users ) ) if not users : return False uid = users [ 0 ] . uid command = const . CMD_DELETE_USER command_string = pack ( 'h' , uid ) cmd_response = self . __send_command ( command , command_string ) if not cmd_response . get ( 'status' ) : raise ZKErrorResponse ( "Can't delete user" ) self . refresh_data ( ) if uid == ( self . next_uid - 1 ) : self . next_uid = uid
delete specific user by uid or user_id
delete specific user by uid or user_id
"""
        delete specific user by uid or user_id

        :param uid: user ID that are generated from device
        :param user_id: your own user ID
        :return: bool
        """
None
self
uid
user ID that are generated from device
user ID that are generated from device
user_id
your own user ID
your own user ID