code: func (state *UserState) FindUserByConfirmationCode(confirmationcode string) (string, error) {
  	unconfirmedUsernames, err := state.AllUnconfirmedUsernames()
  	if err != nil {
  		return "", ErrAllUsersConfirmedAlready
  	}
  
  	// Find the username by looking up the confirmationcode on unconfirmed users
  	username := ""
  	for _, aUsername := range unconfirmedUsernames {
  		aConfirmationCode, err := state.ConfirmationCode(aUsername)
  		if err != nil {
  			// If the confirmation code can not be found, just skip this one
  			continue
  		}
  		if confirmationcode == aConfirmationCode {
  			// Found the right user
  			username = aUsername
  			break
  		}
  	}
  
  	// Check that the user is there
  	if username == "" {
  		return username, ErrConfirmationCodeExpired
  	}
  	if !state.HasUser(username) {
  		return username, ErrMissingUserAtConfirm
  	}
  
  	return username, nil
  }
docs: // Given a unique confirmation code, find the corresponding username.