mailer_send("password_change_confirm.eml", $args, $user["email"], $user["name"]); $mess = _("Please confirm password change. E-mail has been send to you."); CoreUtils::Redirect ("login.php"); } } if ($_POST || $get_hash) { if (!$get_hash) { Application::FireEvent('LoginAttempt', $post_login, $post_pass); try { $Client = Client::LoadByLogin($post_login); } catch (Exception $e) { $mess = _("Client with specified login not found in database"); CoreUtils::Redirect("login.php"); } if ($Crypto->Hash($post_pass) == $Client->Password) { if ($Client->Status == 1) { $sault = $Crypto->Sault(); $_SESSION["sault"] = $sault; $_SESSION["userid"] = $Client->ID; $_SESSION["login"] = $Client->Login;