[Fusionforge-commits] r12757 - trunk/src/common/include

Roland Mas lolando at fusionforge.org
Mon Mar 14 17:49:21 CET 2011


Author: lolando
Date: 2011-03-14 17:49:21 +0100 (Mon, 14 Mar 2011)
New Revision: 12757

Modified:
   trunk/src/common/include/session.php
Log:
Call sync_account_info hook on every page

Modified: trunk/src/common/include/session.php
===================================================================
--- trunk/src/common/include/session.php	2011-03-14 16:49:07 UTC (rev 12756)
+++ trunk/src/common/include/session.php	2011-03-14 16:49:21 UTC (rev 12757)
@@ -557,10 +557,16 @@
 		$params = array();
 		$params['results'] = NULL;
 		plugin_hook_by_reference('fetch_authenticated_user', $params);
+		$user = $params['results'];
 		
-		$G_SESSION = $params['results'];
-		if ($G_SESSION) {
-			$G_SESSION->setLoggedIn(true);
+		if ($user) {
+			$params = array();
+			$params['username'] = $user->getUnixName();
+			$params['event'] = 'every-page';
+			plugin_hook('sync_account_info', $params);
+
+			$user->setLoggedIn(true);
+			$G_SESSION = $user;
 		} else {
 			$G_SESSION=false;
 		}




More information about the Fusionforge-commits mailing list