mirror of
				https://github.com/pierre42100/ComunicAPI
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	Implemented new functionality for account image
This commit is contained in:
		@@ -52,8 +52,8 @@ class accountImage{
 | 
				
			|||||||
			//Get account image visibility level
 | 
								//Get account image visibility level
 | 
				
			||||||
			$visibilityLevel = $this->visibilityLevel($userID);
 | 
								$visibilityLevel = $this->visibilityLevel($userID);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			//If account image is open
 | 
								//If account image is open or if the user signed in is the user making the request
 | 
				
			||||||
			if($visibilityLevel == 3)
 | 
								if($visibilityLevel == 3 || userID == $userID)
 | 
				
			||||||
				//Account image is OPEN
 | 
									//Account image is OPEN
 | 
				
			||||||
				return $accountImageFile;
 | 
									return $accountImageFile;
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
@@ -67,8 +67,12 @@ class accountImage{
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			//Else users must be friends
 | 
								//Else users must be friends
 | 
				
			||||||
			if($visibilityLevel == 1){
 | 
								if($visibilityLevel == 1){
 | 
				
			||||||
				//Level not implemented yet
 | 
									//Check the two persons are friend or not
 | 
				
			||||||
				return $this->accountImageURL.$this->errorAccountImage;
 | 
									if(CS::get()->components->friends->are_friend($userID, userID))
 | 
				
			||||||
 | 
										//User is allowed to access the image
 | 
				
			||||||
 | 
										return $accountImageFile;
 | 
				
			||||||
 | 
									else
 | 
				
			||||||
 | 
										return $this->accountImageURL.$this->errorAccountImage;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user