making sure that imap server variable does not contain mapping.
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 19 Apr 2005 13:56:18 +0000 (13:56 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 19 Apr 2005 13:56:18 +0000 (13:56 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9357 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/change_password/backend/poppassd.php

index 280238b00588ba50d371e7e86b0286681a91953a..1112ccc7c0341c2979771d81815bd9521e517b32 100644 (file)
@@ -84,8 +84,15 @@ function cpw_poppassd_go($username, $old_pw, $new_pw, $debug = 0) {
     global $poppassd_server;
     global $imapServerAddress;
 
+    /** @ignore */
+    if (!defined('SM_PATH')) define('SM_PATH','../../../');
+    /** sqimap_get_user_server() function */
+    include_once(SM_PATH . 'functions/imap_general.php');
+
     if($poppassd_server == '') {
-        $poppassd_server = $imapServerAddress;
+        // if poppassd address is not set, use imap server's address
+        // make sure that setting contains address and not mapping
+        $poppassd_server = sqimap_get_user_server($imapServerAddress,$username);
     }
 
     $messages = array();