From bd7bcb3796e26bc6f98130003fe5f5c6dcda5d5f Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 13 Dec 2012 16:53:48 +0000 Subject: [PATCH] * Password: when using accounts stored in sql, and smtp is of emailadmin_smtp_sql (server must support this, and must be implemented that way) we do change passwords for mailaccounts as well, even the account is stored in sql, as the egroupware database is auth base for the mailserver --- preferences/inc/class.uipassword.inc.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/preferences/inc/class.uipassword.inc.php b/preferences/inc/class.uipassword.inc.php index 6158caaef6..456ae7d6e8 100644 --- a/preferences/inc/class.uipassword.inc.php +++ b/preferences/inc/class.uipassword.inc.php @@ -55,8 +55,16 @@ class uipassword if($GLOBALS['egw_info']['server']['auth_type'] != 'ldap') { - $GLOBALS['egw']->template->set_var('sql_message',lang('note: This feature does *not* change your email password. This will ' - . 'need to be done manually.')); + $smtpClassName = 'defaultsmtp'; + if (($default_profile_id = emailadmin_bo::getDefaultProfileID())) + { + $bofelamimail = felamimail_bo::forceEAProfileLoad($default_profile_id); + //fetch the smtpClass + //_debug_array($bofelamimail->ogServer); + $smtpClassName = get_class($bofelamimail->ogServer); + } + $GLOBALS['egw']->template->set_var('sql_message',($smtpClassName!='emailadmin_smtp_sql'?lang('note: This feature does *not* change your email password. This will ' + . 'need to be done manually.'):'')); } if($_POST['change']) @@ -86,7 +94,7 @@ class uipassword //error_log(__METHOD__.__LINE__.' Strength:'.$strength); if ($strength && $strength>5) $strength =5; - if ($strength && $strength<0) $strength = false; + if ($strength && $strength<0) $strength = false; if($GLOBALS['egw_info']['server']['check_save_passwd'] && $strength==false) $strength=5;//old behavior //error_log(__METHOD__.__LINE__.' Strength:'.$strength); if(($GLOBALS['egw_info']['server']['check_save_passwd'] || $strength) && $error_msg = $GLOBALS['egw']->auth->crackcheck($n_passwd,$strength))