summaryrefslogtreecommitdiffstats
path: root/lib/user.php
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-08-26 16:24:25 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-08-26 16:24:25 +0200
commit5a4854079fbf9c6b359c1c9afdaeb5c6e19609e8 (patch)
tree296c65980f5202881c302c1205943e0ba5d23965 /lib/user.php
parent80374c7cb2f3c98e350c95f92a9785aacef5d2c4 (diff)
downloadnextcloud-server-5a4854079fbf9c6b359c1c9afdaeb5c6e19609e8.tar.gz
nextcloud-server-5a4854079fbf9c6b359c1c9afdaeb5c6e19609e8.zip
implement getHome in OC_User
Diffstat (limited to 'lib/user.php')
-rw-r--r--lib/user.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/user.php b/lib/user.php
index 06a56b7f4a6..97ec0c10504 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -333,6 +333,27 @@ class OC_User {
}
/**
+ * @brief Check if the password is correct
+ * @param $uid The username
+ * @param $password The password
+ * @returns string
+ *
+ * Check if the password is correct without logging in the user
+ * returns the user id or false
+ */
+ public static function getHome($uid){
+ foreach(self::$_usedBackends as $backend){
+ if($backend->implementsActions(OC_USER_BACKEND_GET_HOME)){
+ $result=$backend->getHome($uid);
+ if($result){
+ return $result;
+ }
+ }
+ }
+ return OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ) . '/' . $user;
+ }
+
+ /**
* @brief Get a list of all users
* @returns array with all uids
*