diff --git a/themes/blueprint/js/lightbox.js b/themes/blueprint/js/lightbox.js index caae21490a2bc155421c38f9d59ad48fc71f32f7..2358a6cb850815e827ccd5f8bf57808a28098690 100644 --- a/themes/blueprint/js/lightbox.js +++ b/themes/blueprint/js/lightbox.js @@ -98,9 +98,12 @@ function registerAjaxLogin() { if (response.status == 'OK') { var salt = response.data; - // get the user entered username/password + // get the user entered username/password and auth method var password = form.password.value; var username = form.username.value; + var auth_method = form.auth_method !== 'undefined' + ? form.auth_method.value + : ''; // encrypt the password with the salt password = rc4Encrypt(salt, password); @@ -113,7 +116,7 @@ function registerAjaxLogin() { type: 'POST', url: path + '/AJAX/JSON?method=login', dataType: 'json', - data: {username:username, password:password}, + data: {username:username, password:password, auth_method:auth_method}, success: function(response) { if (response.status == 'OK') { // Hide "log in" options and show "log out" options: diff --git a/themes/bootstrap/js/lightbox.js b/themes/bootstrap/js/lightbox.js index d0b7f46735d6c1070129f9acb726a5bc6c3bb02c..b4b3f1c4f51337850059a651979b90837f945b0a 100644 --- a/themes/bootstrap/js/lightbox.js +++ b/themes/bootstrap/js/lightbox.js @@ -278,9 +278,12 @@ function ajaxLogin(form) { if (response.status == 'OK') { var salt = response.data; - // get the user entered username/password + // get the user entered username/password and auth method var password = form.password.value; var username = form.username.value; + var auth_method = form.auth_method !== 'undefined' + ? form.auth_method.value + : ''; // encrypt the password with the salt password = rc4Encrypt(salt, password); @@ -293,7 +296,7 @@ function ajaxLogin(form) { type: 'POST', url: path + '/AJAX/JSON?method=login', dataType: 'json', - data: {username:username, password:password}, + data: {username:username, password:password, auth_method:auth_method}, success: function(response) { if (response.status == 'OK') { // Hide "log in" options and show "log out" options: