Starting to test some controller
* BlogUnitTest.cs: Should test the user registration * NpgsqlBlogProvider.cs: Fixes usage of Npgsql upgrade to latest version * TestAPI.csproj: switch to .Net framework 4.5.1 * AccountController.cs: refactoring password validation * CalendarController.cs: * WorkFlowController.cs: SendActivationMessage became an extension method * style.css: menu items already have a background and color, since they're `<A>` tags * Unregister.aspx: * AccountController.cs: refactoring user registration * BlogsController.cs: Fixes a confusion between Author and reader ... * YavscHelpers.cs: refactoring the password reset * App.master: no more <div class="menuitem">, they're hyperlinks * Login.aspx: * Profile.aspx: refactoring the user registration * BlogEntryCollection.cs: implements a method to filter a given post collection in order to be displayed tu a given user or anonymous
This commit is contained in:
parent
8a2113a69a
commit
303aaa5e1b
19 changed files with 218 additions and 65 deletions
|
|
@ -72,7 +72,7 @@ namespace Yavsc.ApiControllers
|
|||
break;
|
||||
case MembershipCreateStatus.Success:
|
||||
if (!model.IsApprouved)
|
||||
YavscHelpers.SendActivationMessage (user);
|
||||
Url.SendActivationMessage (user);
|
||||
ProfileBase prtu = ProfileBase.Create (model.UserName);
|
||||
prtu.SetPropertyValue("Name",model.Name);
|
||||
prtu.SetPropertyValue("Address",model.Address);
|
||||
|
|
@ -99,9 +99,12 @@ namespace Yavsc.ApiControllers
|
|||
public void ResetPassword(LostPasswordModel model)
|
||||
{
|
||||
StringDictionary errors;
|
||||
YavscHelpers.ResetPassword (model, out errors);
|
||||
MembershipUser user;
|
||||
YavscHelpers.ValidatePasswordReset (model, out errors, out user);
|
||||
foreach (string key in errors.Keys)
|
||||
ModelState.AddModelError (key, errors [key]);
|
||||
if (user != null && ModelState.IsValid)
|
||||
Url.SendActivationMessage (user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue