mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
fix for incorrect login
This commit is contained in:
parent
34ae5e8cd0
commit
c7da1e6115
1 changed files with 12 additions and 0 deletions
|
@ -33,6 +33,18 @@ if (isset($_POST['user']) && isset($_POST['password'])) {
|
||||||
exec(VESTA_CMD ."v-check-user-password ".$v_user." ".$v_password." '".$_SERVER["REMOTE_ADDR"]."'", $output, $return_var);
|
exec(VESTA_CMD ."v-check-user-password ".$v_user." ".$v_password." '".$_SERVER["REMOTE_ADDR"]."'", $output, $return_var);
|
||||||
if ( $return_var > 0 ) {
|
if ( $return_var > 0 ) {
|
||||||
$ERROR = "<a class=\"error\">"._('Invalid username or password')."</a>";
|
$ERROR = "<a class=\"error\">"._('Invalid username or password')."</a>";
|
||||||
|
// Set system language
|
||||||
|
exec (VESTA_CMD . "v-list-sys-config json", $output, $return_var);
|
||||||
|
$data = json_decode(implode('', $output), true);
|
||||||
|
if (!empty( $data['config']['LANGUAGE'])) {
|
||||||
|
$_SESSION['language'] = $data['config']['LANGUAGE'];
|
||||||
|
} else {
|
||||||
|
$_SESSION['language'] = 'en';
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once($_SERVER['DOCUMENT_ROOT'].'/inc/i18n/'.$_SESSION['language'].'.php');
|
||||||
|
require_once('../templates/header.html');
|
||||||
|
require_once('../templates/login.html');
|
||||||
} else {
|
} else {
|
||||||
unset($output);
|
unset($output);
|
||||||
exec (VESTA_CMD . "v-list-user ".$v_user." json", $output, $return_var);
|
exec (VESTA_CMD . "v-list-user ".$v_user." json", $output, $return_var);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue