Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-11-22 16:24:11 +0400
committerArthur Schiwon <blizzz@owncloud.com>2013-11-22 16:25:20 +0400
commit8ccac86c9893fe0af1715288ce29d85091bca9aa (patch)
tree8c704a9156ad7485a187a5ec6d14f19c112870cc /lib/private/user.php
parent54f0deff2ae60b2914f2cd1f20e7bcb23726edac (diff)
Enable user backends to provide avatar images
Diffstat (limited to 'lib/private/user.php')
-rw-r--r--lib/private/user.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/user.php b/lib/private/user.php
index f15fdf1dbbc..d4be8eb9bd4 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -413,6 +413,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