public function init()
{
parent::init();
/*
$this->api->pathfinder
->addLocation(array(
'addons' => array('addons', 'vendor'),
))
->setBasePath($this->pathfinder->base_location->getPath() . '/..')
;
*/
$this->template['css'] = 'compact.css';
$this->dbConnect();
$this->api->menu->addItem(['Dashboard', 'icon' => 'home'], '/');
$this->api->menu->addItem(['Users', 'icon' => 'users'], 'users');
$this->api->menu->addItem(['Keys', 'icon' => 'key'], 'keychain');
$this->add('dokku_alt/Initiator');
$auth = $this->add('Auth');
$user = $auth->setModel('User');
$auth->usePasswordEncryption();
if ((string) $user->count() > 0) {
$auth->check();
} else {
$this->layout->add('View_Error')->set('No user accounts found. Please define them before continuing.');
}
}