Prechádzať zdrojové kódy

Anonymous users can't have access to the profile

Julio Montoya 15 rokov pred
rodič
commit
6e0c3e652f
2 zmenil súbory, kde vykonal 9 pridanie a 8 odobranie
  1. 1 0
      main/inc/lib/social.lib.php
  2. 8 8
      whoisonline.php

+ 1 - 0
main/inc/lib/social.lib.php

@@ -842,6 +842,7 @@ class SocialManager extends UserManager {
 				$uid = $user[0];
 				$user_info = api_get_user_info($uid);
 				$table_row = array();
+				//Anonymous users can't have access to the profile
 				if (!api_is_anonymous()) {
 					if (api_get_setting('allow_social_tool')=='true') {
 						$url = api_get_path(WEB_PATH).'main/social/profile.php?u='.$uid.$course_url;

+ 8 - 8
whoisonline.php

@@ -130,12 +130,13 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
 		Display::display_header(get_lang('UsersOnLineList'));
 		
 		if (api_get_setting('allow_social_tool') == 'true') {
-			echo '<div id="social-content-left">';	
-				//this include the social menu div
-				if (!api_is_anonymous()) {				
-					SocialManager::show_social_menu('whoisonline');				
-				}	
-			echo '</div>';
+			if (!api_is_anonymous()) {		
+				echo '<div id="social-content-left">';	
+				//this include the social menu div					
+				SocialManager::show_social_menu('whoisonline');
+				echo '</div>';				
+			}	
+			
 	  
 			if ($_GET['id'] == '') {
 				echo '<p><a class="refresh" href="javascript:window.location.reload()">'.get_lang('Refresh').'</a></p>';
@@ -149,8 +150,7 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
 			echo '<div class="actions-title">';
 			echo get_lang('UsersOnLineList');
 			echo '</div>';	
-		}
-			
+		}			
 	}
 
 	if ($user_list) {