JezK
Edit File: changePassword.php
<?php include_once("adminObj.php"); include_once('lang_session.php'); if(isset($_REQUEST['forgetPasswordRequest'])) { $res=$customerObj->changePassword($_POST); // print_r($res); // exit; if($res['status']==1) { $customerObj->setFlashMessage($lang['YOU_HAVE_SUCCESSFULLY_CHANGED_THE_PASSWORD'],'success'); if($res['role']==1) { $customerObj->redirect('../owner_login.php'); } else{ $customerObj->redirect('../login.php'); } } else if($res['status']==0) { $customerObj->setFlashMessage($lang['PASSWORD_AND_CONFIRM_PASSWORD_SHOULD_BE_SAME'],'error'); if($res['role']==1) { $customerObj->redirect('../owner_login.php'); } else{ $customerObj->redirect('../login.php'); } } else if($res['status']==2) { $customerObj->setFlashMessage($lang['Old_password_and_new_password_are_same_please_try_another'],'error'); if($res['role']==1) { $customerObj->redirect('../resetPassword.php?etoken='.$_POST["token"].'&type='.$res['role'].''); } else{ $customerObj->redirect('../resetPassword.php?etoken='.$_POST["token"].'&type='.$res['role'].''); } } else { $customerObj->setFlashMessage($lang['EMAIL_NOT_EXIST'],'error'); } } else if(isset($_REQUEST['changePwd'])) { $email=$_SESSION['customer_token']; // print_r($_SESSION); // echo $email; // exit; $res=$customerObj->updatePassword($_POST); // print_r($res);exit; // echo "<script>alert('$res');</script>"; if($res['status']==1) { echo "<script>alert('".$lang['YOU_HAVE_SUCCESSFULLY_CHANGED_THE_PASSWORD']."');</script>"; echo "<script>window.location.href='../change_password.php'</script>"; } else if($res['status']==2){ echo "<script>alert('".$lang['ENTERED_OLD_PASSWORD_IS_NOT_CORRECT']."');</script>"; echo "<script>window.location.href='../change_password.php'</script>"; } else { echo "<script>alert('".$lang['PASSWORD_AND_CONFIRM_PASSWORD_SHOULD_BE_SAME']."');</script>"; echo "<script>window.location.href='../change_password.php'</script>"; } } ?>