Use profile based password reset from profile page

This commit is contained in:
Johannes Zellner
2021-10-28 18:45:54 +02:00
parent 6cc9d610f1
commit 0daf926740
2 changed files with 11 additions and 2 deletions

View File

@@ -18,10 +18,10 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
});
$scope.sendPasswordReset = function () {
Client.sendPasswordReset($scope.user.email, function (error) {
Client.sendSelfPasswordReset($scope.user.email, function (error) {
if (error) return console.error('Failed to reset password:', error);
Client.notify($translate.instant('profile.passwordResetNotification.title'), $translate.instant('profile.passwordResetNotification.body', { email: $scope.user.fallbackEmail}), false, 'success');
Client.notify($translate.instant('profile.passwordResetNotification.title'), $translate.instant('profile.passwordResetNotification.body', { email: $scope.user.fallbackEmail || $scope.user.email }), false, 'success');
});
};