code: func (m *Manager) GetByName(username string) (*User, error) {
  	var user User
  
  	err := m.getUserCollection().Find(bson.M{"username": username}).One(&user)
  	if user.Avatars == nil {
  		user.Avatars = []Avatar{}
  	}
  	// Get the facebook and github profile pictures if they are linked to the account
  	if user.Github.Avatar_url != "" {
  		user.Avatars = append(user.Avatars, Avatar{Label: "github", Source: user.Github.Avatar_url})
  	}
  	if user.Facebook.Link != "" {
  		user.Avatars = append(user.Avatars, Avatar{Label: "facebook", Source: user.Facebook.Picture})
  	}
  	if user.Addresses == nil {
  		user.Addresses = []Address{}
  	}
  	if user.BankAccounts == nil {
  		user.BankAccounts = []BankAccount{}
  	}
  	if user.Phonenumbers == nil {
  		user.Phonenumbers = []Phonenumber{}
  	}
  	if user.EmailAddresses == nil {
  		user.EmailAddresses = []EmailAddress{}
  	}
  	if user.DigitalWallet == nil {
  		user.DigitalWallet = []DigitalAssetAddress{}
  	}
  	if user.PublicKeys == nil {
  		user.PublicKeys = []PublicKey{}
  	}
  
  	return &user, err
  }
docs: //GetByName gets a user by it's username.