mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Closes #5815
This commit is contained in:
		@@ -42,7 +42,7 @@ func Toggle(options *ToggleOptions) macaron.Handler {
 | 
				
			|||||||
			// prevent infinite redirection
 | 
								// prevent infinite redirection
 | 
				
			||||||
			// also make sure that the form cannot be accessed by
 | 
								// also make sure that the form cannot be accessed by
 | 
				
			||||||
			// users who don't need this
 | 
								// users who don't need this
 | 
				
			||||||
			if ctx.Req.URL.Path == setting.AppSubURL+"/user/settings/change_password" {
 | 
								if ctx.Req.URL.Path == "/user/settings/change_password" {
 | 
				
			||||||
				if !ctx.User.MustChangePassword {
 | 
									if !ctx.User.MustChangePassword {
 | 
				
			||||||
					ctx.Redirect(setting.AppSubURL + "/")
 | 
										ctx.Redirect(setting.AppSubURL + "/")
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user