Permalink
Browse files

fix for incorrect login

  • Loading branch information...
serghey-rodin committed Jan 31, 2013
1 parent 34ae5e8 commit c7da1e61157c8639175411481b70d3f7d3d64fab
Showing with 12 additions and 0 deletions.
  1. +12 −0 web/login/index.php
View
@@ -33,6 +33,18 @@
exec(VESTA_CMD ."v-check-user-password ".$v_user." ".$v_password." '".$_SERVER["REMOTE_ADDR"]."'", $output, $return_var);
if ( $return_var > 0 ) {
$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 {
unset($output);
exec (VESTA_CMD . "v-list-user ".$v_user." json", $output, $return_var);

0 comments on commit c7da1e6

Please sign in to comment.