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

@ -175,6 +175,9 @@ class User{
$return['personnalWebsite'] = $userInfos[0]['site_web']; $return['personnalWebsite'] = $userInfos[0]['site_web'];
$return['isPublicFriendList'] = $userInfos[0]['liste_amis_publique']; $return['isPublicFriendList'] = $userInfos[0]['liste_amis_publique'];
//Add account image url
$return['accountImage'] = path_user_data();
//Only the user may get its mail address //Only the user may get its mail address
if(userID === $userID) if(userID === $userID)
$return['mailAdress'] = $userInfos[0]['mail']; $return['mailAdress'] = $userInfos[0]['mail'];

16
helpers/userData.php Normal file
View File

@ -0,0 +1,16 @@
<?php
/**
* User data helper
*
* @author Pierre HUBERT
*/
/**
* Get and returns the URL path to an userdata file
*
* @param String $fileURI Optionnal, defines the URI pointing on the file
* @return String The full URL to the userdata file
*/
function path_user_data($fileURI = ""){
return CS::get()->config->get("storage_url").$fileURI;
}

View File

@ -18,6 +18,11 @@ foreach(glob(PROJECT_PATH."functions/*.php") as $funcFile){
require_once $funcFile; require_once $funcFile;
} }
//Include helpers
foreach(glob(PROJECT_PATH."helpers/*.php") as $funcFile){
require_once $funcFile;
}
//Create root object //Create root object
$cs = new CS(); $cs = new CS();