Exemplo n.º 1
0
 public function __construct(HereAuth $main)
 {
     $this->main = $main;
     $this->crd = MySQLCredentials::fromConfig($main->getConfig());
     $this->mainTable = $main->getConfig()->getNested("Database.MySQL.TablePrefix", "hereauth_") . "accs";
     $main->getLogger()->info("Initializing database...");
     $db = self::createMysqliInstance($this->crd);
     $db->query("CREATE TABLE IF NOT EXISTS `{$this->mainTable}` (\n\t\t\tname VARCHAR(63) PRIMARY KEY,\n\t\t\thash BINARY(64),\n\t\t\tregister INT UNSIGNED,\n\t\t\tlogin INT UNSIGNED,\n\t\t\tip VARCHAR(50),\n\t\t\tsecret BINARY(16),\n\t\t\tuuid BINARY(16),\n\t\t\tskin BINARY(64),\n\t\t\topts VARCHAR(1024),\n\t\t\tmultihash VARCHAR(1024)\n\t\t)");
     if (isset($db->error) and $db->error) {
         throw new \RuntimeException($db->error);
     }
     $db->close();
 }
 public function __construct(HereAuth $main)
 {
     parent::__construct($main);
     $this->cred = MySQLCredentials::fromConfig($main->getConfig());
 }
 public function __construct(HereAuth $main, ImporterThread $thread)
 {
     parent::__construct($main, $thread);
     $this->cred = MySQLCredentials::fromConfig($main->getConfig());
 }