mirror of
https://github.com/hakasenyang/osu-tournament-php
synced 2026-08-22 03:03:07 +09:00
Fixed Invalid ID
This commit is contained in:
+4
-1
@@ -96,8 +96,11 @@
|
||||
$this->data_profile = $this->Parser->WEBParsing('https://osu.ppy.sh/u/' . $osuid);
|
||||
$this->OsuID = $this->Parser->splits($this->data_profile, 'var userId = ', ';');
|
||||
$this->RealID = $this->Parser->splits($this->data_profile, '<title>', '\'s profile</title>');
|
||||
if(empty($this->OsuID))
|
||||
if(empty($this->OsuID) || empty($this->RealID))
|
||||
{
|
||||
$this->ResetObject();
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->Occupation = $this->Parser->splits($this->data_profile, '<div title=\'Occupation\'><i class=\'icon-pencil\'></i><div>', '</div></div>');
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
function GetDataTest()
|
||||
{
|
||||
global $Check;
|
||||
if(empty($Check->RealID) || empty($Check->OsuID))
|
||||
{
|
||||
echo '<br>User not found<br><br>';
|
||||
return false;
|
||||
}
|
||||
echo $Check->RealID . ' (' . $Check->OsuID . ')';
|
||||
|
||||
if ($Check->Occupation_Set === $Check->Occupation)
|
||||
@@ -28,6 +33,9 @@
|
||||
$Check->CheckUser('angelsIm', 0);
|
||||
GetDataTest();
|
||||
|
||||
$Check->CheckUser('didisksks', 0);
|
||||
GetDataTest();
|
||||
|
||||
$Check->CheckUser('peppy', 0);
|
||||
GetDataTest();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user