mirror of
https://github.com/go-gitea/gitea
synced 2025-07-07 02:57:20 +00:00
Backport #34649 by @wxiaoguang Fix #34358 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -613,7 +613,7 @@ func handleUserCreated(ctx *context.Context, u *user_model.User, gothUser *goth.
|
||||
if user_model.CountUsers(ctx, nil) == 1 {
|
||||
opts := &user_service.UpdateOptions{
|
||||
IsActive: optional.Some(true),
|
||||
IsAdmin: optional.Some(true),
|
||||
IsAdmin: user_service.UpdateOptionFieldFromValue(true),
|
||||
SetLastLogin: true,
|
||||
}
|
||||
if err := user_service.UpdateUser(ctx, u, opts); err != nil {
|
||||
|
Reference in New Issue
Block a user