Show subroutines.php syntax highlighted
<?php
class LoginModule extends Module {
public function onDefault() {
if (Session :: isValid()) {
$this->addContent('logged.php');
} else {
$this->addContent('guest.php');
try {
$users = ModulesManager :: LoadModule("users");
$link = $users->object->getRegistrationLink();
$this->registerVariable($link, "link");
} catch (NoModuleException $e) {
$this->registerVariable("", "link");
}
}
}
}
?>
See more files for this project here