Hi
i want to logout after password change… i try this script
function User_ChangePassword(&$rs, $usr, $oldpwd, &$newpwd) {
// Return FALSE to abort
return TRUE;
$this->Terminate(“logout.php”);
}
but it doesnt work… any hint?
Thank you
Hi
i want to logout after password change… i try this script
function User_ChangePassword(&$rs, $usr, $oldpwd, &$newpwd) {
// Return FALSE to abort
return TRUE;
$this->Terminate(“logout.php”);
}
but it doesnt work… any hint?
Thank you
Your codes ($this->Terminate) is not executed because control is already returned by “return TRUE”. Change the order of the codes.
You cannot use “User_ChangePassword” server event to redirect end-users to logout page, since this event is executed before change password, and not after change password.
So… where i must place that script?
after user change password… system force user to logout
thank you
Simply put the following code in “Page_Redirecting” server event of your Change Password page:
if (!empty($_SESSION[SESSION_SUCCESS_MESSAGE])) {
$this->setSuccessMessage(Language()->phrase(“PasswordChanged”));
$url = “logout.php”;
}
The limitation of this code is, the success message will never be displayed, since the logout process will clear all the session variables; including the one who hold that success message.
owh i see… everything is covered by logic bisnis phpmaker…
Thank you so much