// GetUsername returns the username of the current user.
494999
func GetUsername() *string {
	// user.Current only fails on some internal cache error: not sure what
	// corrective action is appropriate... on failure return NULL.
	if u, err := user.Current(); err == nil {
		return &u.Username
	}
	return nil
}
152584
func Username(url string) string {
	auth := strings.SplitN(credentials(url), ":", 2)
	if len(auth) == 0 {
		return ""
	}
	return auth[0]
}
649117
func (s *ResetServiceSpecificCredentialInput) SetUserName(v string) *ResetServiceSpecificCredentialInput {
	s.UserName = &v
	return s
}
156408
func (s *AdminForgetDeviceInput) SetUsername(v string) *AdminForgetDeviceInput {
	s.Username = &v
	return s
}
1095059
func (um *UserMap) GetByName(name string) (User, error) {
	um.Lock()
	defer um.Unlock()

	for _, user := range um.Map {
		if user.Name == name {
			if user.Options == nil {
				user.Options = make(map[string]interface{})
			}
			return user, nil
		}
	}
	return User{Options: make(map[string]interface{})}, fmt.Errorf("could not find user with name %s", name)
}
427277
func (c *Client) GetUser(name string) (services.User, error) {
	if name == "" {
		return nil, trace.BadParameter("missing username")
	}
	out, err := c.Get(c.Endpoint("users", name), url.Values{})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	user, err := services.GetUserMarshaler().UnmarshalUser(out.Bytes(), services.SkipValidation())
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return user, nil
}
1047559
func (n *Interface) GetName() (string, error) {
	var err C.virError
	result := C.virInterfaceGetNameWrapper(n.ptr, &err)
	if result == nil {
		return "", makeError(&err)
	}
	name := C.GoString(result)
	return name, nil
}
486439
func (a *App) GetName() string {
	if a == nil || a.Name == nil {
		return ""
	}
	return *a.Name
}
221507
func UserName() string {
	gender := randGender()
	switch r.Intn(3) {
	case 0:
		return lookup("en", gender+"_first_names", false) + lookup(lang, gender+"_last_names", false)
	case 1:
		return Character() + lookup(lang, gender+"_last_names", false)
	default:
		return strings.Replace(WordsN(r.Intn(3)+1), " ", "_", -1)
	}
}
276540
func GetUserName(w http.ResponseWriter) (string, bool) {
	usr, ok := GetResponseWriter(w, func(tst http.ResponseWriter) bool {
		_, ok := tst.(*userResponseWriter)
		return ok
	})
	if ok {
		return usr.(*userResponseWriter).userName, true
	}
	return "", false
}
131042
func Username() (string, error) {
	u, err := user.Current()
	if err != nil {
		return "", trace.Wrap(err)
	}
	return u.Username, nil
}
605891
func (r *AdminService) GetUser(userName string) *AdminGetUserCall {
	c := &AdminGetUserCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.userName = userName
	return c
}
1095652
func (u *user) checkUsername(un libkb.NormalizedUsername) error {
	var err error
	if !u.username.Eq(un) {
		err = BadUsernameError{u.username, un}
	}
	return err
}
119887
func (s *ResyncMFADeviceInput) SetUserName(v string) *ResyncMFADeviceInput {
	s.UserName = &v
	return s
}
1234922
func (t *TeamLDAPMapping) GetName() string {
	if t == nil || t.Name == nil {
		return ""
	}
	return *t.Name
}
530736
func (s *UploadSigningCertificateInput) SetUserName(v string) *UploadSigningCertificateInput {
	s.UserName = &v
	return s
}
72585
func (a *AuthorizationApp) GetName() string {
	if a == nil || a.Name == nil {
		return ""
	}
	return *a.Name
}