From 9fe4f5dd131a6497b7146ac3934b49f97f8c3a47 Mon Sep 17 00:00:00 2001
From: prasad <prasad@vtiger.com>
Date: Thu, 14 Jul 2016 10:38:28 +0530
Subject: [PATCH] Fixed portal change password validation.

---
 soap/customerportal.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/soap/customerportal.php b/soap/customerportal.php
index ee78848bf..07cb440b9 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(!empty($list[0]['id'])){
-		return array('MORE_THAN_ONE_USER');
+	if(!isset($list[0]) || empty($list[0]['id'])){
+		return array('INVALID_USERNAME_OR_PASSWORD');
 	}
 	$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