mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-18 16:18:04 +00:00
Created helpers directory
This commit is contained in:
@ -146,7 +146,7 @@ class User{
|
||||
* @param Integer $userID The user ID
|
||||
* @return Array The result of the function (user informations) (empty one if it fails)
|
||||
*/
|
||||
public function getUserInfos($userID): array {
|
||||
public function getUserInfos($userID) : array {
|
||||
//Prepare database request
|
||||
$tablesName = "utilisateurs";
|
||||
$conditions = "WHERE utilisateurs.ID = ?";
|
||||
@ -175,6 +175,9 @@ class User{
|
||||
$return['personnalWebsite'] = $userInfos[0]['site_web'];
|
||||
$return['isPublicFriendList'] = $userInfos[0]['liste_amis_publique'];
|
||||
|
||||
//Add account image url
|
||||
$return['accountImage'] = path_user_data();
|
||||
|
||||
//Only the user may get its mail address
|
||||
if(userID === $userID)
|
||||
$return['mailAdress'] = $userInfos[0]['mail'];
|
||||
|
Reference in New Issue
Block a user