func NewUserValidator(cfg *config.Config, checkPw bool) userValidator {
	return func(u *User) bool {
		if !util.ContainsString(u.Degree, cfg.University.Degrees) ||
			!util.ContainsString(u.Major, cfg.University.Majors) ||
			!util.ContainsString(u.Gender, common.Genders) {
			return false
		}
		return NewUserCredentialsValidator(cfg, checkPw)(u)
	}
}
/*
NewUserValidator instantiates a new user validator
package users
import (
	"bytes"
	"encoding/json"
	log "github.com/golang/glog"
	"github.com/muety/kitsquid/app/common"
	"github.com/muety/kitsquid/app/config"
	"github.com/muety/kitsquid/app/util"
	"golang.org/x/crypto/bcrypt"
	"html/template"
	"net/http"
	"net/url"
	"strings"
	"time"
)
const recaptchaAPIURL = "https://www.google.com/recaptcha/api/siteverify"
var client *http.Client
func getHTTPClient() *http.Client {
	if client == nil {
		client = &http.Client{
			Timeout: 10 * time.Minute,
		}
	}
	return client
}