Add password reset action to profile page

This commit is contained in:
Johannes Zellner
2021-09-09 22:24:35 +02:00
parent d4ffba86a6
commit 04eb179899
3 changed files with 27 additions and 1 deletions
+8
View File
@@ -17,6 +17,14 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
$translate.use(newVal.id);
});
$scope.sendPasswordReset = function () {
Client.sendPasswordReset(function (error) {
if (error) return console.error('Failed to reset password:', error);
Client.notify('Password reset successful', 'Email sent to ' + $scope.user.fallbackEmail, false, 'success');
});
};
$scope.twoFactorAuthentication = {
busy: false,
error: null,