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