aboutsummaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/models/user.go b/models/user.go
index f019475298..2e38502c5b 100644
--- a/models/user.go
+++ b/models/user.go
@@ -29,7 +29,6 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/storage"
"code.gitea.io/gitea/modules/structs"
- api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
@@ -241,24 +240,6 @@ func GetAllUsers() ([]*User, error) {
return users, x.OrderBy("id").Find(&users)
}
-// APIFormat converts a User to api.User
-func (u *User) APIFormat() *api.User {
- if u == nil {
- return nil
- }
- return &api.User{
- ID: u.ID,
- UserName: u.Name,
- FullName: u.FullName,
- Email: u.GetEmail(),
- AvatarURL: u.AvatarLink(),
- Language: u.Language,
- IsAdmin: u.IsAdmin,
- LastLogin: u.LastLoginUnix.AsTime(),
- Created: u.CreatedUnix.AsTime(),
- }
-}
-
// IsLocal returns true if user login type is LoginPlain.
func (u *User) IsLocal() bool {
return u.LoginType <= LoginPlain