code: func (api UsersAPI) GetUserPhoneNumbers(w http.ResponseWriter, r *http.Request) {
  	username := mux.Vars(r)["username"]
  	validated := strings.Contains(r.URL.RawQuery, "validated")
  	userMgr := user.NewManager(r)
  
  	userobj, err := userMgr.GetByName(username)
  	if err != nil {
  		http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
  		return
  	}
  	var phonenumbers []user.Phonenumber
  	if validated {
  		phonenumbers = make([]user.Phonenumber, 0)
  		valMngr := validationdb.NewManager(r)
  		validatednumbers, err := valMngr.GetByUsernameValidatedPhonenumbers(username)
  		if err != nil {
  			log.Error(err)
  			http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  			return
  		}
  		for _, number := range userobj.Phonenumbers {
  			for _, validatednumber := range validatednumbers {
  				if number.Phonenumber == validatednumber.Phonenumber {
  					phonenumbers = append(phonenumbers, number)
  					break
  				}
  			}
  		}
  	} else {
  		phonenumbers = userobj.Phonenumbers
  	}
  
  	w.Header().Set("Content-Type", "application/json")
  	json.NewEncoder(w).Encode(phonenumbers)
  }
docs: // GetUserPhoneNumbers is the handler for GET /users/{username}/phonenumbers