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";
+ }
?>