Ajout des réseaux sociaux pour le user

Fixes #77
This commit is contained in:
Kazhnuz 2025-07-12 13:23:54 +02:00
parent 2401727a20
commit b2f30a0bbb

View file

@ -209,6 +209,18 @@ class User
return $this->getValue('socials')[Text::cleanUrl($social)];
}
public function socials() {
global $site;
$socialNetworks = array();
foreach ($GLOBALS['SOCIAL_NETWORKS'] as $key => $label) {
if ($this->getSocialNetwork($label) != "") {
$socialNetworks[Text::cleanUrl($label)] = new Social($label, $this->getSocialNetwork($label));
}
}
return $socialNetworks;
}
public function profilePicture()
{
$filename = $this->getValue('username') . '.png';