<?php if (!defined('VB_ENTRY')) die('Access denied.'); class vB_Library_API extends vB_Library { public function generateAPIKey() { $random = new vB_Utility_Random(); $newapikey = $random->alphanumeric(32); $assertor = vB::getDbAssertor(); $assertor->update('setting', ['value' => $newapikey], ['varname' => 'apikey']); $assertor->update('setting', ['value' => '1',], ['varname' => 'enableapi']); vB::getDatastore()->build_options(); } } 