rename a user method
This commit is contained in:
@ -165,15 +165,6 @@ func (u *User) AvatarLink() string {
|
||||
return setting.GravatarSource + u.Avatar
|
||||
}
|
||||
|
||||
// DisplayName returns full name if it's not empty,
|
||||
// returns username otherwise.
|
||||
func (u *User) DisplayName() string {
|
||||
if len(u.FullName) > 0 {
|
||||
return u.FullName
|
||||
}
|
||||
return u.Name
|
||||
}
|
||||
|
||||
// NewGitSig generates and returns the signature of given user.
|
||||
func (u *User) NewGitSig() *git.Signature {
|
||||
return &git.Signature{
|
||||
@ -300,12 +291,13 @@ func (u *User) GetOrganizations() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetFullNameFallback returns Full Name if set, otherwise username
|
||||
func (u *User) GetFullNameFallback() string {
|
||||
if u.FullName == "" {
|
||||
return u.Name
|
||||
// DisplayName returns full name if it's not empty,
|
||||
// returns username otherwise.
|
||||
func (u *User) DisplayName() string {
|
||||
if len(u.FullName) > 0 {
|
||||
return u.FullName
|
||||
}
|
||||
return u.FullName
|
||||
return u.Name
|
||||
}
|
||||
|
||||
// IsUserExist checks if given user name exist,
|
||||
|
Reference in New Issue
Block a user