mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-01 22:14:01 +03:00
Fix xenforo.php! (locale)
This commit is contained in:
parent
b5848c10e6
commit
e7676ed28f
1 changed files with 5 additions and 5 deletions
|
@ -5,7 +5,7 @@ header("Content-Type: text/plain; charset=UTF-8");
|
|||
$login = $_GET['login'];
|
||||
$password = $_GET['password'];
|
||||
if(empty($login) || empty($password)) {
|
||||
exit('Empty login or password');
|
||||
exit('Введены неверные данные');
|
||||
}
|
||||
|
||||
// Load XenForo core
|
||||
|
@ -20,7 +20,7 @@ $db = XenForo_Application::get('db');
|
|||
// Resolve user_id by login
|
||||
$result = $db->fetchRow('SELECT user_id, username FROM xf_user WHERE username=' . $db->quote($login) . ' OR email=' . $db->quote($login));
|
||||
if(!count($result)) {
|
||||
exit('Incorrect login');
|
||||
exit('Введены неверные данные');
|
||||
}
|
||||
$user_id = $result['user_id'];
|
||||
$username = $result['username'];
|
||||
|
@ -28,7 +28,7 @@ $username = $result['username'];
|
|||
// Get user data
|
||||
$result = $db->fetchCol('SELECT data FROM xf_user_authenticate WHERE user_id=' . $db->quote($user_id));
|
||||
if(!count($result)) {
|
||||
exit('Unable to get user data: ' . $user_id);
|
||||
exit('Внутренняя ошибка'); // rare!
|
||||
}
|
||||
$data = $result[0];
|
||||
|
||||
|
@ -38,10 +38,10 @@ if(class_exists('XenForo_Authentication_Core12')) {
|
|||
$auth = new XenForo_Authentication_Core12;
|
||||
} else if(class_exists('XenForo_Authentication_Core')) {
|
||||
$auth = new XenForo_Authentication_Core;
|
||||
} else exit('Unable to select authentication core');
|
||||
} else exit('Внутренняя ошибка'); // rare!
|
||||
|
||||
// Try authenticate
|
||||
$auth->setData($data);
|
||||
$success = $auth->authenticate($user_id, $password);
|
||||
echo($success ? 'OK:' . $username : 'Incorrect login or password');
|
||||
echo($success ? 'OK:' . $username : 'Ошибка при авторизации');
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue