diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-12-08 21:37:41 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-12-08 21:37:41 +0100 |
commit | f219f5a7a62fe88b364b9a5f50e9730eba1ee84c (patch) | |
tree | 58c2698337f5c24b65ad1668161d963695a32622 /lib/private/user.php | |
parent | de3ead5ab91b60e4dac76c2f9e0f6e689ad2bfa9 (diff) | |
parent | c23957811d31812cc9193eae0c83f6d7648b971b (diff) | |
download | nextcloud-server-f219f5a7a62fe88b364b9a5f50e9730eba1ee84c.tar.gz nextcloud-server-f219f5a7a62fe88b364b9a5f50e9730eba1ee84c.zip |
Merge pull request #12618 from owncloud/initial-work-migrate-to-appframework
Add REST route for managing groups and users
Diffstat (limited to 'lib/private/user.php')
-rw-r--r-- | lib/private/user.php | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/lib/private/user.php b/lib/private/user.php index b2a235425c4..f93b76a3a64 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -47,6 +47,7 @@ class OC_User { /** * @return \OC\User\Manager + * @deprecated Use \OC::$server->getUserManager() */ public static function getManager() { return OC::$server->getUserManager(); @@ -179,6 +180,7 @@ class OC_User { * itself, not in its subclasses. * * Allowed characters in the username are: "a-z", "A-Z", "0-9" and "_.@-" + * @deprecated Use \OC::$server->getUserManager->createUser($uid, $password) */ public static function createUser($uid, $password) { return self::getManager()->createUser($uid, $password); @@ -190,30 +192,12 @@ class OC_User { * @return bool * * Deletes a user + * @deprecated Use \OC::$server->getUserManager->delete() */ public static function deleteUser($uid) { $user = self::getManager()->get($uid); if ($user) { - $result = $user->delete(); - - // if delete was successful we clean-up the rest - if ($result) { - - // We have to delete the user from all groups - foreach (OC_Group::getUserGroups($uid) as $i) { - OC_Group::removeFromGroup($uid, $i); - } - // Delete the user's keys in preferences - OC_Preferences::deleteUser($uid); - - // 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); - } - - return true; + return $user->delete(); } else { return false; } @@ -525,6 +509,7 @@ class OC_User { * @return string * * returns the path to the users home directory + * @deprecated Use \OC::$server->getUserManager->getHome() */ public static function getHome($uid) { $user = self::getManager()->get($uid); |