code: def confirm_email(self):
          
          if self._email and self.email_new:
              self._email = self.email_new
  
          self.email_confirmed = True
          self.email_link = None
          self.email_new = None
          self.email_link_expires = None
docs: Confirm email