public function onCompletion(Server $server) { $main = HereAuth::getInstance($server); if ($main === null) { return; } $hook = $main->getFridge()->get($this->hook); $hook($this->success); }
public function onCompletion(Server $server) { $main = HereAuth::getInstance($server); if ($main !== null) { $hook = $main->getFridge()->get($this->hookId); if (is_callable($hook)) { $hook($this->success); } } }
public function onCompletion(Server $server) { if (!$this->passed) { $main = HereAuth::getInstance($server); if ($main !== null) { $player = $main->getPlayerById($this->identifier); $player->kick("You created too many accounts!", false); } } }
public function onCompletion(Server $server) { $main = HereAuth::getInstance($server); if ($main !== null) { if ($this->output !== null) { $output = new AccountInfo(); $output->unserialize($this->output); } else { $output = null; } $main->onUserStart($this->identifier, $output); } }
public function onCompletion(Server $server) { $main = HereAuth::getInstance($server); if ($main === null) { return; } $result = $this->getResult(); if (is_array($result)) { $info = AccountInfo::fromDatabaseRow($result); } else { $info = null; } $main->onUserStart($this->identifier, $info); }
public function onCompletion(Server $server) { if (!$this->isReg or $this->time === -1) { return; } $main = HereAuth::getInstance($server); if ($main === null) { return; } $db = $main->getDataBase(); if (!$db instanceof JsonDatabase) { return; } $stmt = $db->getSQLite3()->prepare("INSERT OR REPLACE INTO reg (ip, name, time) VALUES (:ip, :name, :time)"); $stmt->bindValue(":ip", $this->ip, SQLITE3_TEXT); $stmt->bindValue(":name", strtolower($this->name), SQLITE3_TEXT); $stmt->bindValue(":time", $this->time, SQLITE3_INTEGER); $stmt->execute(); }