init(); // Resolve member by login $member = IPSMember::load(IPSText::parseCleanValue($login), 'all', 'username'); $member_id = $member['member_id']; if (!$member_id) { exit('Incorrect login'); } // Try authenticate $success = IPSMember::authenticateMember($member_id, md5(IPSText::parseCleanValue($password))); echo($success ? 'OK:' . $member['name'] : 'Incorrect login or password'); ?>