aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/users.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 02b0f9027..9bb2a3f15 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1672,6 +1672,22 @@ function registration_page_handler($page_elements) {
}
/**
+ * Display a login box.
+ *
+ * This is a fallback for non-JS users who click on the
+ * dropdown login link.
+ */
+function elgg_user_login_page_handler() {
+ $content = elgg_view_layout('one_column', elgg_view('account/forms/login'));
+ $content = '
+ <div id="elgg_content" class="clearfloat">
+ ' . elgg_view('account/forms/login') . '
+ </div>
+ ';
+ page_draw('test', $content);
+}
+
+/**
* Sets the last action time of the given user to right now.
*
* @param int $user_guid The user GUID
@@ -1775,10 +1791,10 @@ function users_init() {
register_page_handler('friends', 'friends_page_handler');
register_page_handler('friendsof', 'friends_of_page_handler');
- //register_page_handler('collections', 'collections_page_handler');
register_page_handler('dashboard', 'dashboard_page_handler');
register_page_handler('register', 'registration_page_handler');
register_page_handler('resetpassword', 'elgg_user_resetpassword_page_handler');
+ register_page_handler('login', 'elgg_user_login_page_handler');
register_action("register", true);
register_action("useradd", true);
@@ -1873,4 +1889,4 @@ function users_test($hook, $type, $value, $params) {
//register actions *************************************************************
register_elgg_event_handler('init','system','users_init',0);
register_elgg_event_handler('pagesetup','system','users_pagesetup',0);
-register_plugin_hook('unit_test', 'system', 'users_test');
+register_plugin_hook('unit_test', 'system', 'users_test'); \ No newline at end of file