diff --git a/lam/templates/login.php b/lam/templates/login.php index 27ef1959..dfebfa44 100644 --- a/lam/templates/login.php +++ b/lam/templates/login.php @@ -15,11 +15,10 @@ use \Ldap; use \htmlResponsiveRow; use \htmlDiv; /* -$Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Michael Duergner - 2005 - 2017 Roland Gruber + 2005 - 2018 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 @@ -501,8 +500,9 @@ if(isset($_POST['checklogin'])) { $searchFilter = str_replace('%USER%', $username ,$searchFilter); $searchDN = ''; $searchPassword = ''; - if (!empty($_SESSION['config']->getLoginSearchDN())) { - $searchDN = $_SESSION['config']->getLoginSearchDN(); + $configLoginSearchDn = $_SESSION['config']->getLoginSearchDN(); + if (!empty($configLoginSearchDn)) { + $searchDN = $configLoginSearchDn; $searchPassword = $_SESSION['config']->getLoginSearchPassword(); } $searchSuccess = true;