From 723e048a4d0a842871d5d7901e8d87dc85dd09ea Mon Sep 17 00:00:00 2001 From: Thomas Hounsell Date: Wed, 6 Jan 2016 11:54:32 +0000 Subject: [PATCH] Admin fixes Add meta description counter; Fix bug #39 --- .../Areas/admin/Views/meta/create.cshtml | 31 +++++++++++++++++-- MongoAuth/MongoMembershipProvider.cs | 2 +- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/BuildFeed/Areas/admin/Views/meta/create.cshtml b/BuildFeed/Areas/admin/Views/meta/create.cshtml index 3b5cf63..892af91 100644 --- a/BuildFeed/Areas/admin/Views/meta/create.cshtml +++ b/BuildFeed/Areas/admin/Views/meta/create.cshtml @@ -22,7 +22,10 @@ @Html.TextAreaFor(model => model.MetaDescription, new { @class = "form-control", rows = "2" }) - @Html.ValidationMessageFor(model => model.MetaDescription) +
+ 0 characters + @Html.ValidationMessageFor(model => model.MetaDescription) +
@@ -34,7 +37,9 @@ @Html.TextAreaFor(model => model.PageContent, new { @class = "form-control" }) - @Html.ValidationMessageFor(model => model.PageContent) +
+ @Html.ValidationMessageFor(model => model.PageContent) +
@@ -54,6 +59,20 @@ @Scripts.Render("~/bundles/jqueryval") } \ No newline at end of file diff --git a/MongoAuth/MongoMembershipProvider.cs b/MongoAuth/MongoMembershipProvider.cs index 2c56a8b..efb8077 100644 --- a/MongoAuth/MongoMembershipProvider.cs +++ b/MongoAuth/MongoMembershipProvider.cs @@ -180,7 +180,7 @@ public override MembershipUser CreateUser(string username, string password, stri public override bool DeleteUser(string username, bool deleteAllRelatedData) { var task = _memberCollection - .DeleteOneAsync(m => m.UserName.ToLower() == username); + .DeleteOneAsync(m => m.UserName.ToLower() == username.ToLower()); task.Wait(); return task.Result.IsAcknowledged && task.Result.DeletedCount == 1;