From b2f30a0bbbedfe5b360e922fa2a643482e61d7dd Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 12 Jul 2025 13:23:54 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Ajout=20des=20r=C3=A9seaux=20sociau?= =?UTF-8?q?x=20pour=20le=20user?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #77 --- bl-kernel/user.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bl-kernel/user.class.php b/bl-kernel/user.class.php index 3075d7ff..4b3e8793 100644 --- a/bl-kernel/user.class.php +++ b/bl-kernel/user.class.php @@ -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';