Browse Source

We don't send the user id when login out ...

Julio Montoya 13 years ago
parent
commit
c37aa6a939
2 changed files with 6 additions and 6 deletions
  1. 4 5
      main/inc/lib/template.lib.php
  2. 2 1
      main/inc/lib/userportal.lib.php

+ 4 - 5
main/inc/lib/template.lib.php

@@ -39,6 +39,10 @@ class Template extends Smarty {
 		//$this->caching = Smarty::CACHING_LIFETIME_CURRENT;				
 		$this->assign('style', $this->style);		
 	}
+		
+	function get_template($name) {
+		return $this->style.'/'.$name;
+	}	
 	
 	private function set_user_parameters() {		
 		if (api_get_user_id()) {
@@ -67,11 +71,6 @@ class Template extends Smarty {
 		$this->assign('app', $app);		
 		
 	}
-	
-	
-	function get_template($name) {
-		return $this->style.'/'.$name;
-	}
 
 	private function set_header_parameters($help = null) {
 		$nameTools = $this->title;

+ 2 - 1
main/inc/lib/userportal.lib.php

@@ -123,7 +123,8 @@ class IndexManager {
 		$tbl_track_login = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_LOGIN);
 	
 		// Selecting the last login of the user.
-		$uid = intval($_GET['uid']);
+		$uid = $this->user_id;
+		
 		$sql_last_connection = "SELECT login_id, login_date FROM $tbl_track_login WHERE login_user_id='$uid' ORDER BY login_date DESC LIMIT 0,1";
 		$q_last_connection = Database::query($sql_last_connection);
 		if (Database::num_rows($q_last_connection) > 0) {