]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix User->setHome when the backend action fails
authorRobin Appelman <icewind@owncloud.com>
Tue, 28 May 2013 22:47:44 +0000 (00:47 +0200)
committerRobin Appelman <icewind@owncloud.com>
Tue, 28 May 2013 22:47:44 +0000 (00:47 +0200)
lib/user/user.php

index 095c37939a70c1cfe7b2206123f5916826ce2e48..fb97ff1a6d819ba86debee8591ea5965c1604c2f 100644 (file)
@@ -139,8 +139,8 @@ class User {
         * @return string
         */
        public function getHome() {
-               if ($this->backend->implementsActions(\OC_USER_BACKEND_GET_HOME)) {
-                       return $this->backend->getHome($this->uid);
+               if ($this->backend->implementsActions(\OC_USER_BACKEND_GET_HOME) and $home = $this->backend->getHome($this->uid)) {
+                       return $home;
                }
                return \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data") . '/' . $this->uid; //TODO switch to Config object once implemented
        }