diff options
author | 6543 <6543@obermui.de> | 2022-05-02 15:35:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-02 21:35:45 +0800 |
commit | e2a3f3d259d230b7d1f62138e789ccdfd8f43b73 (patch) | |
tree | bfb79a507a767f82f0ecf695eea66c2777d2f09d /routers/web | |
parent | 509d8112432bd90f070e35e03f4cf78a416914fc (diff) | |
download | gitea-e2a3f3d259d230b7d1f62138e789ccdfd8f43b73.tar.gz gitea-e2a3f3d259d230b7d1f62138e789ccdfd8f43b73.zip |
Federation: return useful statistic information for nodeinfo (#19561)
Add statistic information for total user count, active user count, issue count and comment count for `/nodeinfo`
Diffstat (limited to 'routers/web')
-rw-r--r-- | routers/web/auth/auth.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/auth/auth.go b/routers/web/auth/auth.go index e8250616ab..be936d2230 100644 --- a/routers/web/auth/auth.go +++ b/routers/web/auth/auth.go @@ -600,7 +600,7 @@ func createUserInContext(ctx *context.Context, tpl base.TplName, form interface{ // sends a confirmation email if required. func handleUserCreated(ctx *context.Context, u *user_model.User, gothUser *goth.User) (ok bool) { // Auto-set admin for the only user. - if user_model.CountUsers() == 1 { + if user_model.CountUsers(nil) == 1 { u.IsAdmin = true u.IsActive = true u.SetLastLogin() |