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?
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -85,8 +84,7 @@ namespace Orchard.Users.Controllers {
|
||||
}
|
||||
|
||||
_authenticationService.SignIn(user, false);
|
||||
foreach (var userEventHandler in _userEventHandlers)
|
||||
{
|
||||
foreach (var userEventHandler in _userEventHandlers) {
|
||||
userEventHandler.LoggedIn(user);
|
||||
}
|
||||
|
||||
@@ -97,8 +95,7 @@ namespace Orchard.Users.Controllers {
|
||||
IUser wasLoggedInUser = _authenticationService.GetAuthenticatedUser();
|
||||
_authenticationService.SignOut();
|
||||
if (wasLoggedInUser != null)
|
||||
foreach (var userEventHandler in _userEventHandlers)
|
||||
{
|
||||
foreach (var userEventHandler in _userEventHandlers) {
|
||||
userEventHandler.LoggedOut(wasLoggedInUser);
|
||||
}
|
||||
return this.RedirectLocal(returnUrl);
|
||||
@@ -142,8 +139,7 @@ namespace Orchard.Users.Controllers {
|
||||
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 })));
|
||||
|
||||
foreach (var userEventHandler in _userEventHandlers)
|
||||
{
|
||||
foreach (var userEventHandler in _userEventHandlers) {
|
||||
userEventHandler.SentChallengeEmail(user);
|
||||
}
|
||||
return RedirectToAction("ChallengeEmailSent");
|
||||
@@ -218,8 +214,7 @@ namespace Orchard.Users.Controllers {
|
||||
|
||||
if ( validated != null ) {
|
||||
_membershipService.SetPassword(validated, newPassword);
|
||||
foreach (var userEventHandler in _userEventHandlers)
|
||||
{
|
||||
foreach (var userEventHandler in _userEventHandlers) {
|
||||
userEventHandler.ChangedPassword(validated);
|
||||
}
|
||||
return RedirectToAction("ChangePasswordSuccess");
|
||||
|
@@ -11,14 +11,14 @@ namespace Orchard.Users.Events
|
||||
void Creating(UserContext context);
|
||||
|
||||
/// <summary>
|
||||
/// Called once a user has been created
|
||||
/// Called after a user has been created
|
||||
/// </summary>
|
||||
void Created(UserContext context);
|
||||
|
||||
// NEW BELOW HERE
|
||||
|
||||
/// <summary>
|
||||
/// Called once a user has logged in
|
||||
/// Called after a user has logged in
|
||||
/// </summary>
|
||||
void LoggedIn(IUser user);
|
||||
|
||||
@@ -33,17 +33,17 @@ namespace Orchard.Users.Events
|
||||
void AccessDenied(IUser user);
|
||||
|
||||
/// <summary>
|
||||
/// Called once a user has changed password
|
||||
/// Called after a user has changed password
|
||||
/// </summary>
|
||||
void ChangedPassword(IUser user);
|
||||
|
||||
/// <summary>
|
||||
/// Called once a user has confirmed their email address
|
||||
/// Called after a user has confirmed their email address
|
||||
/// </summary>
|
||||
void SentChallengeEmail(IUser user);
|
||||
|
||||
/// <summary>
|
||||
/// Called once a user has confirmed their email address
|
||||
/// Called after a user has confirmed their email address
|
||||
/// </summary>
|
||||
void ConfirmedEmail(IUser user);
|
||||
}
|
||||
|
Reference in New Issue
Block a user