mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-21 03:14:10 +08:00
Tweak layout and comments
--HG-- branch : contributions
This commit is contained in:
@@ -58,8 +58,7 @@ namespace Orchard.Users.Controllers {
|
|||||||
//Suggestion: Could instead use the new AccessDenined IUserEventHandler method and let modules decide if they want to log this event?
|
//Suggestion: Could instead use the new AccessDenined IUserEventHandler method and let modules decide if they want to log this event?
|
||||||
Logger.Information("Access denied to user #{0} '{1}' on {2}", currentUser.Id, currentUser.UserName, returnUrl);
|
Logger.Information("Access denied to user #{0} '{1}' on {2}", currentUser.Id, currentUser.UserName, returnUrl);
|
||||||
|
|
||||||
foreach (var userEventHandler in _userEventHandlers)
|
foreach (var userEventHandler in _userEventHandlers) {
|
||||||
{
|
|
||||||
userEventHandler.AccessDenied(currentUser);
|
userEventHandler.AccessDenied(currentUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,8 +84,7 @@ namespace Orchard.Users.Controllers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_authenticationService.SignIn(user, false);
|
_authenticationService.SignIn(user, false);
|
||||||
foreach (var userEventHandler in _userEventHandlers)
|
foreach (var userEventHandler in _userEventHandlers) {
|
||||||
{
|
|
||||||
userEventHandler.LoggedIn(user);
|
userEventHandler.LoggedIn(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,8 +95,7 @@ namespace Orchard.Users.Controllers {
|
|||||||
IUser wasLoggedInUser = _authenticationService.GetAuthenticatedUser();
|
IUser wasLoggedInUser = _authenticationService.GetAuthenticatedUser();
|
||||||
_authenticationService.SignOut();
|
_authenticationService.SignOut();
|
||||||
if (wasLoggedInUser != null)
|
if (wasLoggedInUser != null)
|
||||||
foreach (var userEventHandler in _userEventHandlers)
|
foreach (var userEventHandler in _userEventHandlers) {
|
||||||
{
|
|
||||||
userEventHandler.LoggedOut(wasLoggedInUser);
|
userEventHandler.LoggedOut(wasLoggedInUser);
|
||||||
}
|
}
|
||||||
return this.RedirectLocal(returnUrl);
|
return this.RedirectLocal(returnUrl);
|
||||||
@@ -142,8 +139,7 @@ namespace Orchard.Users.Controllers {
|
|||||||
if ( user.As<UserPart>().EmailStatus == UserStatus.Pending ) {
|
if ( user.As<UserPart>().EmailStatus == UserStatus.Pending ) {
|
||||||
_userService.SendChallengeEmail(user.As<UserPart>(), nonce => Url.AbsoluteAction(() => Url.Action("ChallengeEmail", "Account", new { Area = "Orchard.Users", nonce = nonce })));
|
_userService.SendChallengeEmail(user.As<UserPart>(), nonce => Url.AbsoluteAction(() => Url.Action("ChallengeEmail", "Account", new { Area = "Orchard.Users", nonce = nonce })));
|
||||||
|
|
||||||
foreach (var userEventHandler in _userEventHandlers)
|
foreach (var userEventHandler in _userEventHandlers) {
|
||||||
{
|
|
||||||
userEventHandler.SentChallengeEmail(user);
|
userEventHandler.SentChallengeEmail(user);
|
||||||
}
|
}
|
||||||
return RedirectToAction("ChallengeEmailSent");
|
return RedirectToAction("ChallengeEmailSent");
|
||||||
@@ -218,8 +214,7 @@ namespace Orchard.Users.Controllers {
|
|||||||
|
|
||||||
if ( validated != null ) {
|
if ( validated != null ) {
|
||||||
_membershipService.SetPassword(validated, newPassword);
|
_membershipService.SetPassword(validated, newPassword);
|
||||||
foreach (var userEventHandler in _userEventHandlers)
|
foreach (var userEventHandler in _userEventHandlers) {
|
||||||
{
|
|
||||||
userEventHandler.ChangedPassword(validated);
|
userEventHandler.ChangedPassword(validated);
|
||||||
}
|
}
|
||||||
return RedirectToAction("ChangePasswordSuccess");
|
return RedirectToAction("ChangePasswordSuccess");
|
||||||
|
@@ -11,14 +11,14 @@ namespace Orchard.Users.Events
|
|||||||
void Creating(UserContext context);
|
void Creating(UserContext context);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called once a user has been created
|
/// Called after a user has been created
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void Created(UserContext context);
|
void Created(UserContext context);
|
||||||
|
|
||||||
// NEW BELOW HERE
|
// NEW BELOW HERE
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called once a user has logged in
|
/// Called after a user has logged in
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void LoggedIn(IUser user);
|
void LoggedIn(IUser user);
|
||||||
|
|
||||||
@@ -33,17 +33,17 @@ namespace Orchard.Users.Events
|
|||||||
void AccessDenied(IUser user);
|
void AccessDenied(IUser user);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called once a user has changed password
|
/// Called after a user has changed password
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void ChangedPassword(IUser user);
|
void ChangedPassword(IUser user);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called once a user has confirmed their email address
|
/// Called after a user has confirmed their email address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void SentChallengeEmail(IUser user);
|
void SentChallengeEmail(IUser user);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called once a user has confirmed their email address
|
/// Called after a user has confirmed their email address
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void ConfirmedEmail(IUser user);
|
void ConfirmedEmail(IUser user);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user