fix Customer change password
This commit is contained in:
parent
812844a15a
commit
8ee0edf985
@ -25,11 +25,10 @@ switch ($action) {
|
|||||||
$password = _post('password');
|
$password = _post('password');
|
||||||
run_hook('customer_change_password'); #HOOK
|
run_hook('customer_change_password'); #HOOK
|
||||||
if ($password != '') {
|
if ($password != '') {
|
||||||
$d_pass = $d['password'];
|
$d_pass = $user['password'];
|
||||||
$npass = _post('npass');
|
$npass = _post('npass');
|
||||||
$cnpass = _post('cnpass');
|
$cnpass = _post('cnpass');
|
||||||
|
if ($password == $d_pass) {
|
||||||
if (Password::_uverify($password, $d_pass) == true) {
|
|
||||||
if (!Validator::Length($password, 36, 2)) {
|
if (!Validator::Length($password, 36, 2)) {
|
||||||
r2(U . 'accounts/change-password', 'e', 'New Password must be 2 to 35 character');
|
r2(U . 'accounts/change-password', 'e', 'New Password must be 2 to 35 character');
|
||||||
}
|
}
|
||||||
@ -56,12 +55,12 @@ switch ($action) {
|
|||||||
}
|
}
|
||||||
$user->password = $npass;
|
$user->password = $npass;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
User::removeCookie();
|
||||||
_msglog('s', Lang::T('Password changed successfully, Please login again'));
|
session_destroy();
|
||||||
_log('[' . $user['username'] . ']: Password changed successfully', 'User', $user['id']);
|
_log('[' . $user['username'] . ']: Password changed successfully', 'User', $user['id']);
|
||||||
|
_alert(Lang::T('Password changed successfully, Please login again'), 'success', "login");
|
||||||
r2(U . 'login');
|
|
||||||
} else {
|
} else {
|
||||||
|
die($password);
|
||||||
r2(U . 'accounts/change-password', 'e', Lang::T('Incorrect Current Password'));
|
r2(U . 'accounts/change-password', 'e', Lang::T('Incorrect Current Password'));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -535,5 +535,8 @@
|
|||||||
"Additional_Information": "informasi tambahan",
|
"Additional_Information": "informasi tambahan",
|
||||||
"City_of_Resident": "Kota Residen",
|
"City_of_Resident": "Kota Residen",
|
||||||
"State_of_Resident": "Negara Bagian Tempat Tinggal",
|
"State_of_Resident": "Negara Bagian Tempat Tinggal",
|
||||||
"Zip_Code": "Kode Pos"
|
"Zip_Code": "Kode Pos",
|
||||||
|
"Phone": "Telepon",
|
||||||
|
"Customer_Geo_Location_Information": "Informasi Lokasi Geo Pelanggan",
|
||||||
|
"": ""
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user