From bd879301774927cdc2a3f6d534b2a8a7e262f62c Mon Sep 17 00:00:00 2001 From: prasad <prasad@vtiger.com> Date: Thu, 14 Jul 2016 11:00:20 +0530 Subject: [PATCH] Restored compatibility with portal app while changing password. --- soap/customerportal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soap/customerportal.php b/soap/customerportal.php index 07cb440b9..3438af8a1 100755 --- a/soap/customerportal.php +++ b/soap/customerportal.php @@ -1072,8 +1072,8 @@ function change_password($input_array) return null; $list = authenticate_user($username,$password,$version ,'false'); - if(!isset($list[0]) || empty($list[0]['id'])){ - return array('INVALID_USERNAME_OR_PASSWORD'); + if(!empty($list[0]['id']) && $id != $list[0]['id']){ + return array('MORE_THAN_ONE_USER'); /* compatability with portal app */ } $sql = "update vtiger_portalinfo set user_password=?, cryptmode=? where id=? and user_name=?"; $result = $adb->pquery($sql, array(Vtiger_Functions::generateEncryptedPassword($password), 'CRYPT', $id, $username)); -- GitLab