From 37a9f13e4ae8ed75692126b5224d85df46348684 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 30 Jul 2014 14:55:35 +0200 Subject: [PATCH] Fix copy/paste err: the validateAccount function was defined 2 times --- .../share/phplist/www/admin/auth/external_auth.inc | 46 +--------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/root/usr/share/phplist/www/admin/auth/external_auth.inc b/root/usr/share/phplist/www/admin/auth/external_auth.inc index 15d9d3c..944fc84 100644 --- a/root/usr/share/phplist/www/admin/auth/external_auth.inc +++ b/root/usr/share/phplist/www/admin/auth/external_auth.inc @@ -42,51 +42,7 @@ class admin_auth { } function validateAccount($id) { - /* can only do this after upgrade, which means - * that the first login will always fail - $query - = ' select id, disabled,password,privileges' - . ' from %s' - . ' where id = ?'; - */ - - $query - = ' select id, disabled,password' - . ' from %s' - . ' where id = ?'; - - $query = sprintf($query, $GLOBALS['tables']['admin']); - $req = Sql_Query_Params($query, array($id)); - $data = Sql_Fetch_Row($req); - if (!$data[0]) { - return array(0,s("No such account")); - } elseif ($data[1]) { - return array(0,s("your account has been disabled")); - } - - ## do this seperately from above, to avoid lock out when the DB hasn't been upgraded. - ## so, ignore the error - $query - = ' select privileges' - . ' from %s' - . ' where id = ?'; - - $query = sprintf($query, $GLOBALS['tables']['admin']); - $req = Sql_Query_Params($query, array($id),1); - if ($req) { - $data = Sql_Fetch_Row($req); - } else { - $data = array(); - } - - if (!empty($data[0])) { - $_SESSION['privileges'] = unserialize($data[0]); - } - return array(1,"OK"); - } - - function validateAccount($id) { - /* can only do this after upgrade, which means + /* can only do this after upgrade, which means * that the first login will always fail $query = ' select id, disabled,password,privileges'