summaryrefslogtreecommitdiff
path: root/src/controllers/AuthPage.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/controllers/AuthPage.class.php')
-rw-r--r--src/controllers/AuthPage.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controllers/AuthPage.class.php b/src/controllers/AuthPage.class.php
index b31d938..1f46f72 100644
--- a/src/controllers/AuthPage.class.php
+++ b/src/controllers/AuthPage.class.php
@@ -1,5 +1,6 @@
<?php
require_once('Login.class.php');
+require_once('Auth.class.php');
Router::register('auth', 'AuthPage');
@@ -41,12 +42,11 @@ class AuthPage extends Controller {
$this->showView('auth/logout');
}
private function maybe_login() {
- global $mm;
$uid = Login::isLoggedIn();
if ($uid===false) {
$this->login();
} else {
- $username = $mm->database()->getUsername($uid);
+ $username = Auth::getInstance($uid)->getName();
$this->showView('auth/index',
array('username'=>$username));
}