public UserDeletedEvent(User user) { _user = user; }
public UserRolledBackEvent(User user) { _user = user; }
public UserUpdatedEvent(User user) { _user = user; }
public UserCreatedEvent(User user) { _user = user; }
public bool CreateNewAccountPassword(User _user) { string salt; string plainPassword; var password = GeneratePassword(out salt, out plainPassword); var success = userRepository.SavePassword(_user.ID, salt, password); if (success) { var replacements = new Dictionary<string, string>(4) { {"#forename#", _user.Forename}, {"#surname#", _user.Surname}, {"#username#", _user.Username}, {"#password#", plainPassword}, // {"#sitename#", configurationService.SiteName()}, // {"#siteurl#", configurationService.SiteURL()}, {"#accounttype#", _user.Roles.HasContent() ? _user.Roles.First().Name : string.Empty}, }; const string key = "AdminCreateAccount"; /* if (notificationService.SendMail(key, _user.EventDescription, replacements)) { notificationService.SendEmailLog(key, _user.Username); return true; }*/ return true; } // MessageBusService.Log(string.Format("Account Manager: An error occured while trying to email the account details to '{0}'", _user.Username)); MessageBusService.AddError(string.Format("An error occured while trying to email the account details to '{0}'.", _user.Username)); return false; }