Welcome to Vtiger Community. To gain access for account, please contact [ info @ vtiger.com ]

Commit bd879301774927cdc2a3f6d534b2a8a7e262f62c

Authored by Prasad
1 parent 9fe4f5dd

Restored compatibility with portal app while changing password.

Showing 1 changed file with 2 additions and 2 deletions
soap/customerportal.php
... ... @@ -1072,8 +1072,8 @@ function change_password($input_array)
1072 1072 return null;
1073 1073  
1074 1074 $list = authenticate_user($username,$password,$version ,'false');
1075   - if(!isset($list[0]) || empty($list[0]['id'])){
1076   - return array('INVALID_USERNAME_OR_PASSWORD');
  1075 + if(!empty($list[0]['id']) && $id != $list[0]['id']){
  1076 + return array('MORE_THAN_ONE_USER'); /* compatability with portal app */
1077 1077 }
1078 1078 $sql = "update vtiger_portalinfo set user_password=?, cryptmode=? where id=? and user_name=?";
1079 1079 $result = $adb->pquery($sql, array(Vtiger_Functions::generateEncryptedPassword($password), 'CRYPT', $id, $username));
... ...