mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 09:03:49 +00:00
Enhance [master] - update check_auth to use $text (#2661)
* Enhance - update check_auth to use $text convert to messages::add and utilize $text for invalid_credentials * Russian translations for check_auth
This commit is contained in:
@@ -26,7 +26,11 @@
|
||||
//includes
|
||||
require_once "resources/require.php";
|
||||
|
||||
//for compatability require this library if less than version 5.5
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get('resources');
|
||||
|
||||
//for compatibility require this library if less than version 5.5
|
||||
if (version_compare(phpversion(), '5.5', '<')) {
|
||||
require_once "resources/functions/password.php";
|
||||
}
|
||||
@@ -55,8 +59,7 @@
|
||||
//if the username is not provided then send to login.php
|
||||
if (strlen($_REQUEST["username"]) == 0 && strlen($_REQUEST["key"]) == 0) {
|
||||
$target_path = ($_REQUEST["path"] != '') ? $_REQUEST["path"] : $_SERVER["REQUEST_URI"];
|
||||
$_SESSION["message_mood"] = "negative";
|
||||
$_SESSION["message"] = "Invalid Username and/or Password";
|
||||
messages::add($text['message-invalid_credentials'], 'negative');
|
||||
header("Location: ".PROJECT_PATH."/login.php?path=".urlencode($target_path));
|
||||
exit;
|
||||
}
|
||||
@@ -97,8 +100,7 @@
|
||||
closelog();
|
||||
//redirect the user to the login page
|
||||
$target_path = ($_REQUEST["path"] != '') ? $_REQUEST["path"] : $_SERVER["PHP_SELF"];
|
||||
$_SESSION["message_mood"] = "negative";
|
||||
$_SESSION["message"] = "Invalid Username and/or Password";
|
||||
messages::add($text['message-invalid_credentials'], 'negative');
|
||||
header("Location: ".PROJECT_PATH."/login.php?path=".urlencode($target_path));
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user