RFID programming question

Hello, I am doing my final year project and we are using RFID . We are making an automated bin. When the cleaner comes and tap his/her RFID tag, The bin will automatically OPEN so that the cleaner can maintain the bin.

Here comes the problem . I want to program it so that when the cleaner scans the RFID the first time, the bin will open But when she scan the second time the bin will close. (check the attached picture)

I do not know how to reset the rfid stored data.

The following is part of my project code.

  Serial.print("UID tag :");
  String content = "";
  byte letter;
  for (byte i = 0; i < mfrc522.uid.size; i++)
  {
    Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");
    Serial.print(mfrc522.uid.uidByte[i], HEX);
    content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));
    content.concat(String(mfrc522.uid.uidByte[i], HEX));
  }
  Serial.println();
  content.toUpperCase();
  if ((binpos == 1) && content.substring(1) == "3C 12 B8 79") //change here the UID of the card/cards that you want to give access
  {
    lcd.setCursor(0, 0);
    Serial.println("Authorized");
    lcd.print("Authorized access");
    delay(2000);
    binpos = 0 ;
 

  }
  

    if ((binpos == 0) && content.substring(1) == "3C 12 B8 79"){
      Serial.println("Authorized");
      Serial.print ("Closing");
      delay(2000);
      binpos = 1;
 

    }
  
 


else {
  Serial.println("scanning for item");
  scan();
}
  if ( ! mfrc522.PICC_IsNewCardPresent()) {
    return;
  }

  // Select one of the cards
  if ( ! mfrc522.PICC_ReadCardSerial()) {
    return;
  }

rfid.JPG

Not sure what you mean by reset the rfid stored data, but if i was to guess, why could you not simply set content = "";

Also, I might add, you should always post the complete code, if you do not it leads to guessing, or worse, lack of help.