]> source.dussan.org Git - nextcloud-server.git/commitdiff
Can also be null
authorLukas Reschke <lukas@owncloud.com>
Fri, 13 Mar 2015 12:19:29 +0000 (13:19 +0100)
committerLukas Reschke <lukas@owncloud.com>
Fri, 13 Mar 2015 13:01:24 +0000 (14:01 +0100)
If the user does not exist this returns null and can lead to nasty bugs since the IDE is not indicating this...

lib/private/user/manager.php
lib/public/iusermanager.php

index 85abd001ca87c282831bd43898c6bcd75484add0..99619bcba3a9c1fa8604c35c7f0cef75a044022f 100644 (file)
@@ -103,7 +103,7 @@ class Manager extends PublicEmitter implements IUserManager {
         * get a user by user id
         *
         * @param string $uid
-        * @return \OC\User\User
+        * @return \OC\User\User|null Either the user or null if the specified user does not exist
         */
        public function get($uid) {
                if (isset($this->cachedUsers[$uid])) { //check the cache first to prevent having to loop over the backends
index 1691aee8e7d20a5394543d4478dd087e6496f0ef..e2079ef8cc2161142103597d51a936d46884c4a6 100644 (file)
@@ -53,7 +53,7 @@ interface IUserManager {
         * get a user by user id
         *
         * @param string $uid
-        * @return \OCP\IUser
+        * @return \OCP\IUser|null Either the user or null if the specified user does not exist
         */
        public function get($uid);