From 64043e9bcc4f30be1046fef6f9a9880f4497d59e Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Thu, 14 Jan 2016 14:28:03 +0100 Subject: move methods to correct interface, deprecate private interface --- lib/private/user/backend.php | 2 +- lib/private/user/interface.php | 64 ++++-------------------------------------- lib/private/user/user.php | 5 ++-- 3 files changed, 9 insertions(+), 62 deletions(-) (limited to 'lib/private/user') diff --git a/lib/private/user/backend.php b/lib/private/user/backend.php index 075ff9e6e24..c8e3577d112 100644 --- a/lib/private/user/backend.php +++ b/lib/private/user/backend.php @@ -63,7 +63,7 @@ define('OC_USER_BACKEND_COUNT_USERS', 1 << 28); * Abstract base class for user management. Provides methods for querying backend * capabilities. */ -abstract class OC_User_Backend implements OC_User_Interface { +abstract class OC_User_Backend implements \OCP\UserInterface { /** * error code for functions not provided by the user backend */ diff --git a/lib/private/user/interface.php b/lib/private/user/interface.php index c935a92820b..b487a046c72 100644 --- a/lib/private/user/interface.php +++ b/lib/private/user/interface.php @@ -25,62 +25,8 @@ * */ -interface OC_User_Interface { - - /** - * Check if backend implements actions - * @param int $actions bitwise-or'ed actions - * @return boolean - * - * Returns the supported actions as int to be - * compared with \OC_User_Backend::CREATE_USER etc. - */ - public function implementsActions($actions); - - /** - * delete a user - * @param string $uid The username of the user to delete - * @return bool - */ - public function deleteUser($uid); - - /** - * Get a list of all users - * - * @param string $search - * @param null|int $limit - * @param null|int $offset - * @return string[] an array of all uids - */ - public function getUsers($search = '', $limit = null, $offset = null); - - /** - * check if a user exists - * @param string $uid the username - * @return boolean - */ - public function userExists($uid); - - /** - * get display name of the user - * @param string $uid user ID of the user - * @return string display name - */ - public function getDisplayName($uid); - - /** - * Get a list of all display names and user ids. - * - * @param string $search - * @param string|null $limit - * @param string|null $offset - * @return array an array of all displayNames (value) and the corresponding uids (key) - */ - public function getDisplayNames($search = '', $limit = null, $offset = null); - - /** - * Check if a user list is available or not - * @return boolean if users can be listed or not - */ - public function hasUserListings(); -} +/** + * Interface OC_User_Interface + * @deprecated use the public \OCP\UserInterface instead + */ +interface OC_User_Interface extends \OCP\UserInterface {} diff --git a/lib/private/user/user.php b/lib/private/user/user.php index c6c608703eb..c2a6acc7664 100644 --- a/lib/private/user/user.php +++ b/lib/private/user/user.php @@ -35,6 +35,7 @@ use OCP\IImage; use OCP\IURLGenerator; use OCP\IUser; use OCP\IConfig; +use OCP\UserInterface; class User implements IUser { /** @var string $uid */ @@ -43,7 +44,7 @@ class User implements IUser { /** @var string $displayName */ private $displayName; - /** @var \OC_User_Interface $backend */ + /** @var UserInterface $backend */ private $backend; /** @var bool $enabled */ @@ -69,7 +70,7 @@ class User implements IUser { /** * @param string $uid - * @param \OC_User_Interface $backend + * @param UserInterface $backend * @param \OC\Hooks\Emitter $emitter * @param IConfig|null $config * @param IURLGenerator $urlGenerator -- cgit v1.2.3