Allow to use username or password for user deletion form

This commit is contained in:
Johannes Zellner
2016-04-03 01:42:06 +02:00
parent 65c6806109
commit fd0326efb1
2 changed files with 7 additions and 6 deletions
+3 -2
View File
@@ -326,9 +326,10 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.userremove.error.username = null;
$scope.userremove.error.password = null;
if ($scope.userremove.username !== $scope.userremove.userInfo.username) {
$scope.userremove.error.username = 'Username does not match';
if ($scope.userremove.username !== $scope.userremove.userInfo.username && $scope.userremove.username !== $scope.userremove.userInfo.email) {
$scope.userremove.error.username = true;
$scope.userremove.username = '';
$scope.userremove_form.username.$setPristine();
$('#inputUserRemoveUsername').focus();
return;
}