mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	@@ -105,9 +105,16 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
 | 
			
		||||
 | 
			
		||||
				// Check if enabled auto-registration.
 | 
			
		||||
				if setting.Service.EnableReverseProxyAutoRegister {
 | 
			
		||||
					email := gouuid.NewV4().String() + "@localhost"
 | 
			
		||||
					if setting.Service.EnableReverseProxyEmail {
 | 
			
		||||
						webAuthEmail := ctx.Req.Header.Get(setting.ReverseProxyAuthEmail)
 | 
			
		||||
						if len(webAuthEmail) > 0 {
 | 
			
		||||
							email = webAuthEmail
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					u := &models.User{
 | 
			
		||||
						Name:     webAuthUser,
 | 
			
		||||
						Email:    gouuid.NewV4().String() + "@localhost",
 | 
			
		||||
						Email:    email,
 | 
			
		||||
						Passwd:   webAuthUser,
 | 
			
		||||
						IsActive: true,
 | 
			
		||||
					}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user