Skip to content

Clear member cache by older user name when member user name is updated (13)#19672

Merged
nikolajlauridsen merged 2 commits into
v13/devfrom
v13/bugfix/clear-member-cache-for-previous-username
Jul 7, 2025
Merged

Clear member cache by older user name when member user name is updated (13)#19672
nikolajlauridsen merged 2 commits into
v13/devfrom
v13/bugfix/clear-member-cache-for-previous-username

Added unit test.

a475e3b
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v13/dev) failed Jul 4, 2025 in 42s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce critical code health rules (1 file with Bumpy Road Ahead)
Enforce advisory code health rules (1 file with Excess Number of Function Arguments)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce critical code health rules Violations Code Health Impact
MemberService.cs 1 critical rule 6.91 → 6.81 Suppress
Enforce advisory code health rules Violations Code Health Impact
DistributedCacheExtensionsTests.cs 1 advisory rule 10.00 → 9.69 Suppress

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Excess Number of Function Arguments DistributedCacheExtensionsTests.cs: CreateMember
  • Bumpy Road Ahead MemberService.cs: Save

Annotations

Check warning on line 793 in src/Umbraco.Core/Services/MemberService.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v13/dev)

❌ New issue: Bumpy Road Ahead

Save has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 63 in tests/Umbraco.Tests.UnitTests/Umbraco.Core/Cache/DistributedCacheExtensionsTests.cs

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (v13/dev)

❌ New issue: Excess Number of Function Arguments

CreateMember has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.