diff options
author | blizzz <blizzz@owncloud.com> | 2013-11-26 12:05:32 -0800 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2013-11-26 12:05:32 -0800 |
commit | 4f15282bc998bb68896b5df67f4f749dd435897d (patch) | |
tree | d30a978ee443343541cfc9f825bba229da107296 /lib/private/user.php | |
parent | 1fef97f6a535cd79d0aea600634ec54c5f87bcea (diff) | |
parent | 69518b901326617a2a80986df0e250038684563b (diff) | |
download | nextcloud-server-4f15282bc998bb68896b5df67f4f749dd435897d.tar.gz nextcloud-server-4f15282bc998bb68896b5df67f4f749dd435897d.zip |
Merge pull request #6058 from owncloud/ldap2avatar
Set Avatar for LDAP users automatically (if a picture is available)
Diffstat (limited to 'lib/private/user.php')
-rw-r--r-- | lib/private/user.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/user.php b/lib/private/user.php index 5bd36006750..210e5ed3f02 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -425,6 +425,22 @@ class OC_User { } /** + * @brief Check whether user can change his avatar + * @param string $uid The username + * @return bool + * + * Check whether a specified user can change his avatar + */ + public static function canUserChangeAvatar($uid) { + $user = self::getManager()->get($uid); + if ($user) { + return $user->canChangeAvatar(); + } else { + return false; + } + } + + /** * @brief Check whether user can change his password * @param string $uid The username * @return bool |