mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 19:49:11 +03:00
3962041825
* Fix ipb.php! (fixed locale). * Fix phpbb.php! * wordpress.php locale! * Fix xenforo.php! (locale) * Update ipb.php * Fix dle die logging! * Update dle.php
28 lines
871 B
PHP
28 lines
871 B
PHP
<?php
|
|
header("Content-Type: text/plain; charset=UTF-8");
|
|
|
|
// Verify login and password
|
|
$login = $_GET['login'];
|
|
$password = $_GET['password'];
|
|
if(empty($login) || empty($password)) {
|
|
exit('Введены неверные данные');
|
|
}
|
|
|
|
// Load IPB core
|
|
define('IPB_THIS_SCRIPT', 'public');
|
|
require('initdata.php'); // not once!!!
|
|
require_once(IPS_ROOT_PATH . 'sources/base/ipsRegistry.php');
|
|
$reg = ipsRegistry::instance();
|
|
$reg->init();
|
|
|
|
// Resolve member by login
|
|
$member = IPSMember::load(IPSText::parseCleanValue($login), 'all', 'username');
|
|
$member_id = $member['member_id'];
|
|
if (!$member_id) {
|
|
exit('Введены неверные данные');
|
|
}
|
|
|
|
// Try authenticate
|
|
$success = IPSMember::authenticateMember($member_id, md5(IPSText::parseCleanValue($password)));
|
|
echo($success ? 'OK:' . $member['name'] : 'Ошибка при авторизации');
|
|
?>
|