We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35d6fc2 commit c288d03Copy full SHA for c288d03
src/Umbraco.Core/Security/Authorization/IAuthorizationHelper.cs
@@ -24,5 +24,17 @@ public interface IAuthorizationHelper
24
/// <param name="currentUser">The current user's principal.</param>
25
/// <param name="user">The resulting <see cref="IUser" />, if the conversion is successful.</param>
26
/// <returns>True if the conversion is successful, false otherwise</returns>
27
- bool TryGetUmbracoUser(IPrincipal currentUser, [NotNullWhen(true)] out IUser? user);
+ bool TryGetUmbracoUser(IPrincipal currentUser, [NotNullWhen(true)] out IUser? user)
28
+ {
29
+ try
30
31
+ user = GetUmbracoUser(currentUser);
32
+ return true;
33
+ }
34
+ catch
35
36
+ user = null;
37
+ return false;
38
39
40
}
0 commit comments