Browse Source

changeset 9234 b0249cc3ecb1 from Dokeos

Julio Montoya 15 years ago
parent
commit
33f13b6d0d
1 changed files with 15 additions and 9 deletions
  1. 15 9
      main/inc/lib/main_api.lib.php

+ 15 - 9
main/inc/lib/main_api.lib.php

@@ -799,16 +799,22 @@ function api_get_user_info($user_id = '') {
 		// ideally the names of the fields of the user table are renamed so that they match $_user (or vice versa)
 		// $_user should also contain every field of the user table (except password maybe). This would make the
 		// following lines obsolete (and the code cleaner and slimmer !!!
-		$user_info['firstName'] = $result_array['firstname'];
-		$user_info['lastName'] = $result_array['lastname'];
-		$user_info['mail'] = $result_array['email'];
-		$user_info['picture_uri'] = $result_array['picture_uri'];
-		$user_info['user_id'] = $result_array['user_id'];
+		
+		$user_info['firstname']		= $result_array['firstname'];
+		$user_info['lastname']		= $result_array['lastname'];
+		
+		//Kept for historical reasons
+		$user_info['firstName']		= $result_array['firstname'];
+		$user_info['lastName'] 		= $result_array['lastname'];		
+		
+		$user_info['mail'] 			= $result_array['email'];
+		$user_info['picture_uri'] 	= $result_array['picture_uri'];
+		$user_info['user_id'] 		= $result_array['user_id'];
 		$user_info['official_code'] = $result_array['official_code'];
-		$user_info['status'] = $result_array['status'];
-		$user_info['auth_source'] = $result_array['auth_source'];
-		$user_info['username'] = $result_array['username'];
-		$user_info['theme'] = $result_array['theme'];
+		$user_info['status']		= $result_array['status'];
+		$user_info['auth_source'] 	= $result_array['auth_source'];
+		$user_info['username'] 		= $result_array['username'];
+		$user_info['theme'] 		= $result_array['theme'];
 		return $user_info;
 	}
 	return false;