mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-04 17:34:49 -04:00
clarify name/username/owner/pusher for webhook
This commit is contained in:
parent
061a879cea
commit
f94d7c3f51
3 changed files with 34 additions and 9 deletions
|
@ -167,6 +167,14 @@ 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
|
||||
}
|
||||
return u.FullName
|
||||
}
|
||||
|
||||
// IsUserExist checks if given user name exist,
|
||||
// the user name should be noncased unique.
|
||||
func IsUserExist(name string) (bool, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue