diff --git a/Teknik/Areas/User/Views/User/ViewProfile.cshtml b/Teknik/Areas/User/Views/User/ViewProfile.cshtml index a2992d5..e0e99a4 100644 --- a/Teknik/Areas/User/Views/User/ViewProfile.cshtml +++ b/Teknik/Areas/User/Views/User/ViewProfile.cshtml @@ -18,14 +18,14 @@ string pgpFingerprint = pgpFingerprint = string.Empty; string pgpFingerprint64 = string.Empty; - if (!string.IsNullOrEmpty(Model.IdentityUserInfo.PGPPublicKey)) + if (!string.IsNullOrEmpty(Model.IdentityUserInfo?.PGPPublicKey)) { - pgpFingerprint = PGP.GetFingerprint(Model.IdentityUserInfo.PGPPublicKey); - pgpFingerprint64 = PGP.GetFingerprint64(Model.IdentityUserInfo.PGPPublicKey); + pgpFingerprint = PGP.GetFingerprint(Model.IdentityUserInfo?.PGPPublicKey); + pgpFingerprint64 = PGP.GetFingerprint64(Model.IdentityUserInfo?.PGPPublicKey); }
-

@Model.Username

+

@Model.Username

if (User.IsInRole("Admin")) { @@ -68,7 +68,7 @@
- +
@@ -77,20 +77,20 @@
-
+
- @if (!string.IsNullOrEmpty(Model.UserSettings.Website)) + @if (!string.IsNullOrEmpty(Model.UserSettings?.Website)) { } - @if (!string.IsNullOrEmpty(Model.UserSettings.Quote)) + @if (!string.IsNullOrEmpty(Model.UserSettings?.Quote)) {
Quote
@@ -121,17 +121,17 @@
}
- @if (!string.IsNullOrEmpty(Model.UserSettings.About)) + @if (!string.IsNullOrEmpty(Model.UserSettings?.About)) {
@if (OwnProfile) { -
@Html.Markdown(Model.UserSettings.About)
+
@Html.Markdown(Model.UserSettings?.About)
} else { - @Html.Markdown(Model.UserSettings.About) + @Html.Markdown(Model.UserSettings?.About) }
}