From dba2d5e1044e1c246b282b4580a68ea08ef69989 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 5 Jan 2013 16:08:51 +0000 Subject: [PATCH] fix problem if no profile exists --- lam/templates/login.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lam/templates/login.php b/lam/templates/login.php index 801f5161..50ba79f1 100644 --- a/lam/templates/login.php +++ b/lam/templates/login.php @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Michael Duergner - 2005 - 2012 Roland Gruber + 2005 - 2013 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -80,7 +80,7 @@ if(isset($_GET['useProfile'])) { $_SESSION['config'] = new LAMConfig($_GET['useProfile']); // Recreate the config object with the submited } // Load login page -else { +elseif (!empty($default_Profile)) { $_SESSION["config"] = new LAMConfig($default_Profile); // Create new Config object } @@ -202,6 +202,7 @@ function display_LoginPage($config_object) { copyConfigTemplates(getConfigProfiles()); // set focus on password field + if (!empty($config_object)) { echo "\n"; + } ?>