mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add option to purge users (#18064)
Add the ability to purge users when deleting them. Close #15588 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		@@ -316,7 +316,7 @@ func DeleteUser(ctx *context.APIContext) {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err := user_service.DeleteUser(ctx.ContextUser); err != nil {
 | 
			
		||||
	if err := user_service.DeleteUser(ctx, ctx.ContextUser, ctx.FormBool("purge")); err != nil {
 | 
			
		||||
		if models.IsErrUserOwnRepos(err) ||
 | 
			
		||||
			models.IsErrUserHasOrgs(err) ||
 | 
			
		||||
			models.IsErrUserOwnPackages(err) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user