summaryrefslogtreecommitdiffstats
path: root/lib/user/manager.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-06-03 13:33:56 +0200
committerRobin Appelman <icewind@owncloud.com>2013-06-03 13:33:56 +0200
commiteb2a1e0f8a9514530702cbb049a309ad3ee75938 (patch)
treebb5ca690ab30ee5d39cd12751ddb8ac13324c990 /lib/user/manager.php
parent1a4021a0fe0a5b3b9242109b2de441d30dfb5235 (diff)
downloadnextcloud-server-eb2a1e0f8a9514530702cbb049a309ad3ee75938.tar.gz
nextcloud-server-eb2a1e0f8a9514530702cbb049a309ad3ee75938.zip
move phpdoc comments
Diffstat (limited to 'lib/user/manager.php')
-rw-r--r--lib/user/manager.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/user/manager.php b/lib/user/manager.php
index 3b6d4bcfe55..9adf66c825c 100644
--- a/lib/user/manager.php
+++ b/lib/user/manager.php
@@ -43,6 +43,8 @@ class Manager extends PublicEmitter {
}
/**
+ * register a user backend
+ *
* @param \OC_User_Backend $backend
*/
public function registerBackend($backend) {
@@ -50,6 +52,8 @@ class Manager extends PublicEmitter {
}
/**
+ * remove a user backend
+ *
* @param \OC_User_Backend $backend
*/
public function removeBackend($backend) {
@@ -58,16 +62,21 @@ class Manager extends PublicEmitter {
}
}
+ /**
+ * remove all user backends
+ */
public function clearBackends() {
$this->backends = array();
}
/**
+ * get a user by user id
+ *
* @param string $uid
* @return \OC\User\User
*/
public function get($uid) {
- if (isset($this->cachedUsers[$uid])) {
+ if (isset($this->cachedUsers[$uid])) { //check the cache first to prevent having to loop over the backends
return $this->cachedUsers[$uid];
}
foreach ($this->backends as $backend) {
@@ -78,6 +87,13 @@ class Manager extends PublicEmitter {
return null;
}
+ /**
+ * get or construct the user object
+ *
+ * @param string $uid
+ * @param \OC_User_Backend $backend
+ * @return \OC\User\User
+ */
protected function getUserObject($uid, $backend) {
if (isset($this->cachedUsers[$uid])) {
return $this->cachedUsers[$uid];
@@ -87,6 +103,8 @@ class Manager extends PublicEmitter {
}
/**
+ * check if a user exists
+ *
* @param string $uid
* @return bool
*/