diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-21 14:05:08 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-21 14:05:08 +0100 |
commit | 6ff96b34ad0462ad05c34633ccd08236b93bf195 (patch) | |
tree | 1acd7eb869d512b5a3fc9502961a98591ea20cfa /lib/private/user.php | |
parent | e139f7c863d5971a6386070148496cb0f70ad04e (diff) | |
parent | 37af74efb3e3511b2d6eacef67dc90f22a685bd3 (diff) | |
download | nextcloud-server-6ff96b34ad0462ad05c34633ccd08236b93bf195.tar.gz nextcloud-server-6ff96b34ad0462ad05c34633ccd08236b93bf195.zip |
Merge branch 'master' into load-apps-proper-master
Conflicts:
apps/files/ajax/rawlist.php
cron.php
ocs/v1.php
Diffstat (limited to 'lib/private/user.php')
-rw-r--r-- | lib/private/user.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/private/user.php b/lib/private/user.php index 11f96aabf74..dc4c7ec3b61 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -205,6 +205,9 @@ class OC_User { // Delete user files in /data/ OC_Helper::rmdirr(\OC_User::getHome($uid)); + // Delete the users entry in the storage table + \OC\Files\Cache\Storage::remove('home::' . $uid); + // Remove it from the Cache self::getManager()->delete($uid); } @@ -219,11 +222,12 @@ class OC_User { * @brief Try to login a user * @param $uid The username of the user to log in * @param $password The password of the user - * @return bool + * @return boolean|null * * Log in a user and regenerate a new session - if the password is ok */ public static function login($uid, $password) { + session_regenerate_id(true); return self::getUserSession()->login($uid, $password); } @@ -243,7 +247,6 @@ class OC_User { OC_Hook::emit( "OC_User", "pre_login", array( "run" => &$run, "uid" => $uid )); if($uid) { - session_regenerate_id(true); self::setUserId($uid); self::setDisplayName($uid); self::getUserSession()->setLoginName($uid); @@ -287,6 +290,7 @@ class OC_User { /** * @brief Sets user display name for session + * @param string $uid */ public static function setDisplayName($uid, $displayName = null) { if (is_null($displayName)) { @@ -476,7 +480,7 @@ class OC_User { * @brief Check if the password is correct * @param string $uid The username * @param string $password The password - * @return mixed user id a string on success, false otherwise + * @return string|false user id a string on success, false otherwise * * Check if the password is correct without logging in the user * returns the user id or false @@ -510,6 +514,8 @@ class OC_User { * @returns array with all uids * * Get a list of all users. + * @param integer $limit + * @param integer $offset */ public static function getUsers($search = '', $limit = null, $offset = null) { $users = self::getManager()->search($search, $limit, $offset); @@ -604,7 +610,7 @@ class OC_User { /** * @brief Returns the first active backend from self::$_usedBackends. - * @return null if no backend active, otherwise OCP\Authentication\IApacheBackend + * @return OCP\Authentication\IApacheBackend|null if no backend active, otherwise OCP\Authentication\IApacheBackend */ private static function findFirstActiveUsedBackend() { foreach (self::$_usedBackends as $backend) { |