diff options
author | kondou <kondou@ts.unde.re> | 2014-03-15 15:27:48 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-10-23 23:17:18 +0200 |
commit | 729dffed5ec924492962a41b4697ca05ad40da79 (patch) | |
tree | ac9cf4391a14953c03cab1564a2ff1e4c0e0cd6a /lib/private/helper.php | |
parent | e26a16afea14df7428dd614906fc94521538dfe3 (diff) | |
download | nextcloud-server-729dffed5ec924492962a41b4697ca05ad40da79.tar.gz nextcloud-server-729dffed5ec924492962a41b4697ca05ad40da79.zip |
Load avatar in header via PHP
* fix #7484
* use UID, css, and div instead of span
Diffstat (limited to 'lib/private/helper.php')
-rw-r--r-- | lib/private/helper.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php index 823e82ceeb1..628af14fa08 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -280,6 +280,21 @@ class OC_Helper { } /** + * shows whether the user has an avatar + * @param string $user username + * @return bool avatar set or not + **/ + public static function userAvatarSet($user) { + $avatar = new \OC_Avatar($user); + $image = $avatar->get(1); + if ($image instanceof \OC_Image) { + return true; + } else { + return false; + } + } + + /** * Make a human file size * @param int $bytes file size in bytes * @return string a human readable file size |