mirror of
				https://github.com/D4M13N-D3V/comissions-app-core-api.git
				synced 2025-10-31 09:35:25 +00:00 
			
		
		
		
	fix: only add numbers if name taken
This commit is contained in:
		
							parent
							
								
									3767bbd6a9
								
							
						
					
					
						commit
						b919942705
					
				| @ -32,6 +32,7 @@ public class UserMiddleware | ||||
|             if (user == null) | ||||
|             { | ||||
|                 var displayName = context.User.Claims.FirstOrDefault(x=>x.Type==ClaimTypes.Name)?.Value ?? "Anonymous"; | ||||
|                 if(dbContext.Users.Any(x=>x.DisplayName==displayName)) | ||||
|                     displayName = $"{displayName}#{Guid.NewGuid().ToString().Substring(0, 4)}"; | ||||
|                 user = new User | ||||
|                 { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Damien Ostler
						Damien Ostler