String returns a displayable name for the user.
()
| 36 | |
| 37 | // String returns a displayable name for the user. |
| 38 | func (u *User) String() string { |
| 39 | if u.AuthDomain != "" && strings.HasSuffix(u.Email, "@"+u.AuthDomain) { |
| 40 | return u.Email[:len(u.Email)-len("@"+u.AuthDomain)] |
| 41 | } |
| 42 | if u.FederatedIdentity != "" { |
| 43 | return u.FederatedIdentity |
| 44 | } |
| 45 | return u.Email |
| 46 | } |
| 47 | |
| 48 | // LoginURL returns a URL that, when visited, prompts the user to sign in, |
| 49 | // then redirects the user to the URL specified by dest. |
no outgoing calls