fewer globals
This commit is contained in:
parent
33d24b2f5c
commit
966180aef5
1 changed files with 6 additions and 6 deletions
|
@ -46,15 +46,15 @@ class UserPage implements Extension {
|
||||||
if(is_null($this->theme)) $this->theme = get_theme_object($this);
|
if(is_null($this->theme)) $this->theme = get_theme_object($this);
|
||||||
|
|
||||||
if($event instanceof InitExtEvent) {
|
if($event instanceof InitExtEvent) {
|
||||||
global $config;
|
$event->context->config->set_default_bool("login_signup_enabled", true);
|
||||||
$config->set_default_bool("login_signup_enabled", true);
|
$event->context->config->set_default_int("login_memory", 365);
|
||||||
$config->set_default_int("login_memory", 365);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($event instanceof PageRequestEvent) && $event->page_matches("user_admin")) {
|
if(($event instanceof PageRequestEvent) && $event->page_matches("user_admin")) {
|
||||||
global $user;
|
$user = $event->context->user;
|
||||||
global $database;
|
$database = $event->context->database;
|
||||||
global $config;
|
$config = $event->context->config;
|
||||||
|
$page = $event->context->page;
|
||||||
|
|
||||||
if($event->get_arg(0) == "login") {
|
if($event->get_arg(0) == "login") {
|
||||||
if(isset($_POST['user']) && isset($_POST['pass'])) {
|
if(isset($_POST['user']) && isset($_POST['pass'])) {
|
||||||
|
|
Reference in a new issue