Revert "Some changes in saml login system."

This reverts commit 2c1e80d913.
This commit is contained in:
Arturo Gonzalez 2016-02-18 12:53:39 +01:00
parent 2c1e80d913
commit 45d8ac18a8
3 changed files with 6 additions and 15 deletions

View File

@ -127,9 +127,7 @@ echo '<div id="login_in">';
if ($config['auth'] == 'saml') {
html_print_submit_button(__("Login with SAML"), "login_button_saml", false, 'class="sub login_boton"');
}
else {
html_print_submit_button(__("Login"), "login_button", false, 'class="sub next_login"');
}
html_print_submit_button(__("Login"), "login_button", false, 'class="sub next_login"');
echo '</div>';
break;
case 'logout':

View File

@ -253,16 +253,14 @@ echo '</form>';
function show_selected_rows (event) {
var auth_method = $(this).val();
if (auth_method !== 'mysql') {
if ((auth_method !== 'mysql') && (auth_method !== 'saml')) {
$('tr.remote').show();
if (auth_method == 'saml') {
$('tr#table2-autocreate_remote_users').hide();
}
show_autocreate_options(null);
}
else {
$('tr.remote').hide();
}
// Hide all the auth methods (except mysql)
_.each(auth_methods, function(value, key) {
if (value !== 'mysql')

View File

@ -289,14 +289,9 @@ if (! isset ($config['id_user'])) {
$expired_pass = false;
}
else if (($config['auth'] == 'saml') && $login_button_saml) {
if (is_user_admin($nick)) {
$nick_in_db = $nick;
}
else {
include_once(ENTERPRISE_DIR . "/include/auth/saml.php");
$saml_user_id = saml_process_user_login();
$nick_in_db = $saml_user_id;
}
include_once(ENTERPRISE_DIR . "/include/auth/saml.php");
$saml_user_id = saml_process_user_login();
$nick_in_db = $saml_user_id;
}
else {
// process_user_login is a virtual function which should be defined in each auth file.