* Web.config:
* Web.csproj: * Web.config: * Blog.cs: * Index.aspx: * BBCodeHelper.cs: * Comment.cs: * yavscModel.csproj: * BlogEntry.cs: * UserPost.aspx: * UserPosts.aspx: * Estimate.cs: * RemovePost.aspx: * TitleNotFound.aspx: * BlogProvider.cs: * AccountController.cs: * BlogsApiController.cs: * WorkFlowController.cs: * BlogEditEntryModel.cs: * FindBlogEntryFlags.cs: * BlogEntryCollection.cs: * Comment.cs: * BlogEditCommentModel.cs: * NpgsqlBlogProvider.cs: * NpgsqlContentProvider.cs: * BlogEntry.cs: * NpgsqlBlogProvider.csproj: * NpgsqlMembershipProvider.cs: * FindBlogEntryFlags.cs: * BlogEntryCollection.cs: * BlogHelper.cs: refactoring: moving code from NpgsqlBlogProvider to yavscModel.Blogs * BlogManager.cs: NpgsqlBlogProvider/BlogHelper.cs * BlogsController.cs: a successfull confirmed removal * Blog.cs: refactoring
This commit is contained in:
@ -163,7 +163,7 @@ namespace Yavsc.Controllers
|
||||
|
||||
// ChangePassword will throw an exception rather
|
||||
// than return false in certain failure scenarios.
|
||||
bool changePasswordSucceeded;
|
||||
bool changePasswordSucceeded=false;
|
||||
try {
|
||||
var users = Membership.FindUsersByName (model.Username);
|
||||
|
||||
@ -172,9 +172,10 @@ namespace Yavsc.Controllers
|
||||
changePasswordSucceeded = user.ChangePassword (model.OldPassword, model.NewPassword);
|
||||
} else {
|
||||
changePasswordSucceeded = false;
|
||||
ModelState.AddModelError ("Username", "The user name not found.");
|
||||
}
|
||||
} catch (Exception) {
|
||||
changePasswordSucceeded = false;
|
||||
} catch (Exception ex) {
|
||||
ViewData ["Error"] = ex.ToString ();
|
||||
}
|
||||
|
||||
if (changePasswordSucceeded) {
|
||||
|
Reference in New Issue
Block a user