Created helpers directory

This commit is contained in:
Pierre
2017-05-25 15:16:34 +02:00
parent e000e59374
commit 83b0982068
3 changed files with 25 additions and 1 deletions

View File

@ -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'];