]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Forward to dashboard when login.
authorSem <sembrestels@riseup.net>
Thu, 22 Nov 2012 16:13:14 +0000 (17:13 +0100)
committerSem <sembrestels@riseup.net>
Thu, 22 Nov 2012 16:13:14 +0000 (17:13 +0100)
start.php

index 17646dad68c0823745c9506baeadd13c84df24cc..47343f2739c079e05488e0277387870fa027417c 100644 (file)
--- a/start.php
+++ b/start.php
@@ -1,6 +1,12 @@
 <?php
 
 function profile_widgets_init() {
+
+       // Set dashboard as default page after login
+       if (elgg_is_active_plugin('dashboard') && !isset($_SESSION['last_forward_from'])) {
+               $_SESSION['last_forward_from'] = 'dashboard';
+       }
+
        elgg_register_widget_type('thewirewrite', elgg_echo('thewire:add'), elgg_echo("thewire:yourdesc:write:desc"), 'dashboard');
 }