code: func (auth *Auth) SyncUser(query *models.LoginUserQuery) error {
  	// connect to ldap server
  	err := auth.Dial()
  	if err != nil {
  		return err
  	}
  	defer auth.conn.Close()
  
  	err = auth.serverBind()
  	if err != nil {
  		return err
  	}
  
  	// find user entry & attributes
  	user, err := auth.searchForUser(query.Username)
  	if err != nil {
  		auth.log.Error("Failed searching for user in ldap", "error", err)
  		return err
  	}
  
  	auth.log.Debug("Ldap User found", "info", spew.Sdump(user))
  
  	grafanaUser, err := auth.GetGrafanaUserFor(query.ReqContext, user)
  	if err != nil {
  		return err
  	}
  
  	query.User = grafanaUser
  	return nil
  }
docs: // SyncUser syncs user with Grafana