private async System.Threading.Tasks.Task ChangeUserPassword() { if (PasswordChangeModel.ValidateModel()) { try { bool success = await _adminService.ChangeUserPasswordAsync(CurrentUser, PasswordChangeModel.OldPassword, PasswordChangeModel.NewPassword, PasswordChangeModel.NewPassword2); if (success) { ChangeNotification.Raise(new Notification() { Title = Properties.Resources.PasswordChange_Title, Content = Properties.Resources.PasswordChange_Success }); IsPasswordInEditMode = false; _userCredentials.Password = PasswordChangeModel.NewPassword; _userCredentials.UpdateCredentialsForAllFactories(); } else { ChangeNotification.Raise(new Notification() { Title = Properties.Resources.PasswordChange_Title, Content = Properties.Resources.PasswordChange_Failed }); } } catch (TimeoutException timeoutEx) { _eventAggregator.GetEvent <TimeoutErrorEvent>().Publish(timeoutEx); } } }