Fix change password Customer

This commit is contained in:
Ibnu Maksum 2024-06-25 14:02:48 +07:00
parent 8ee0edf985
commit c85f680fea
No known key found for this signature in database
GPG key ID: 7FC82848810579E5

View file

@ -35,7 +35,7 @@ switch ($action) {
if ($npass != $cnpass) {
r2(U . 'accounts/change-password', 'e', 'Both Password should be same');
}
$user->password = $npass;
$tur = ORM::for_table('tbl_user_recharges')->where('customer_id', $user['id'])->find_one();
if ($tur) {
// if has active plan, change the password to devices
@ -53,7 +53,6 @@ switch ($action) {
}
}
}
$user->password = $npass;
$user->save();
User::removeCookie();
session_destroy();