Forwarding ChangePassword from asp.net provider to IMembershipService. Also fixing an error handling issue in forms auth service.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4040941
This commit is contained in:
loudej
2009-11-17 06:00:14 +00:00
parent e225650203
commit 03e9442111
2 changed files with 6 additions and 1 deletions

View File

@@ -65,6 +65,7 @@ namespace Orchard.Security.Providers {
int userId;
if (!int.TryParse(userData, out userId)) {
Logger.Fatal("User id not a parsable integer");
return null;
}
return _modelManager.Get(userId).As<IUser>();
}

View File

@@ -51,7 +51,11 @@ namespace Orchard.Security.Providers {
}
public override bool ChangePassword(string username, string oldPassword, string newPassword) {
throw new NotImplementedException();
var service = GetService();
var user = service.ValidateUser(username, oldPassword);
if (user == null)
return false;
service.SetPassword(user, newPassword);
}
public override string ResetPassword(string username, string answer) {