Redirect to Changepassword page on default password
I want to add function where if it detect the password of user when default password="12345" it will redirect to changepassword page upon logging in.
I tried to put the code to custom scripts but it doest work.
Please help thank you.
$userid = CurrentUserID();
$pswd = ExecuteScalar("SELECT password FROM userlogin WHERE id='$userid'");
if ($pswd == "12345"){
header('Location: changepassword');
} else{
header('Location: home');
}