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'] : 'Ошибка при авторизации'); ?>