From bd9f34dbd3487eb8ea140258a5f3b0e2be9c0317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Tue, 10 May 2005 21:14:20 +0000 Subject: [PATCH] bugfix in password migration --- phpgwapi/inc/class.auth_sql.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.auth_sql.inc.php b/phpgwapi/inc/class.auth_sql.inc.php index bee0db8a9c..f99aa853e1 100644 --- a/phpgwapi/inc/class.auth_sql.inc.php +++ b/phpgwapi/inc/class.auth_sql.inc.php @@ -65,9 +65,10 @@ if(!$this->compare_password($passwd,$this->db->f('account_pwd'),$this->type,strtolower($username))) { // do we have to migrate an old password ? - if($GLOBALS['egw_info']['server']['passwd_migration_allowed']) + if($GLOBALS['egw_info']['server']['pwd_migration_allowed']) { - foreach($GLOBALS['egw_info']['server']['passwd_migration_types'] as $type) + if(!is_array($GLOBALS['egw_info']['server']['pwd_migration_types'])) return false; + foreach($GLOBALS['egw_info']['server']['pwd_migration_types'] as $handle => $type) { if($this->compare_password($passwd,$this->db->f('account_pwd'),$type,strtolower($username))) { @@ -76,6 +77,7 @@ $this->_update_passwd($encrypted_passwd,$passwd,$account_id,false,__FILE__); break; } + return false; } } else