Skip to content
Snippets Groups Projects
Commit 85acf35c authored by Matthew Juhl's avatar Matthew Juhl
Browse files

Add page handler for 'login'

parent aa15d1bb
No related branches found
No related tags found
No related merge requests found
...@@ -161,6 +161,21 @@ ...@@ -161,6 +161,21 @@
register_elgg_event_handler('logout', 'user', 'logoutCas'); register_elgg_event_handler('logout', 'user', 'logoutCas');
} }
/* set up login page */
register_page_handler('login', 'login_page_handler');
function login_page_handler($page) {
// If we're not logged in, display the login page
if (!isloggedin()) {
page_draw(elgg_echo('login'), elgg_view("account/forms/login"));
// Otherwise, forward to the index page
} else {
forward();
}
}
/** /**
* CAS client initialization * CAS client initialization
* *
...@@ -215,32 +230,6 @@ ...@@ -215,32 +230,6 @@
} }
/** /**
* LDAP authentication * LDAP authentication
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment