interface.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * @author Arthur Schiwon <blizzz@owncloud.com>
  4. * @author Christopher Schäpers <kondou@ts.unde.re>
  5. * @author Joas Schilling <nickvergessen@owncloud.com>
  6. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  7. * @author Morris Jobke <hey@morrisjobke.de>
  8. * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
  9. * @author Thomas Müller <thomas.mueller@tmit.eu>
  10. *
  11. * @copyright Copyright (c) 2015, ownCloud, Inc.
  12. * @license AGPL-3.0
  13. *
  14. * This code is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU Affero General Public License, version 3,
  16. * as published by the Free Software Foundation.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Affero General Public License, version 3,
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>
  25. *
  26. */
  27. interface OC_User_Interface {
  28. /**
  29. * Check if backend implements actions
  30. * @param int $actions bitwise-or'ed actions
  31. * @return boolean
  32. *
  33. * Returns the supported actions as int to be
  34. * compared with \OC_User_Backend::CREATE_USER etc.
  35. */
  36. public function implementsActions($actions);
  37. /**
  38. * delete a user
  39. * @param string $uid The username of the user to delete
  40. * @return bool
  41. */
  42. public function deleteUser($uid);
  43. /**
  44. * Get a list of all users
  45. *
  46. * @param string $search
  47. * @param null|int $limit
  48. * @param null|int $offset
  49. * @return string[] an array of all uids
  50. */
  51. public function getUsers($search = '', $limit = null, $offset = null);
  52. /**
  53. * check if a user exists
  54. * @param string $uid the username
  55. * @return boolean
  56. */
  57. public function userExists($uid);
  58. /**
  59. * get display name of the user
  60. * @param string $uid user ID of the user
  61. * @return string display name
  62. */
  63. public function getDisplayName($uid);
  64. /**
  65. * Get a list of all display names and user ids.
  66. *
  67. * @param string $search
  68. * @param string|null $limit
  69. * @param string|null $offset
  70. * @return array an array of all displayNames (value) and the corresponding uids (key)
  71. */
  72. public function getDisplayNames($search = '', $limit = null, $offset = null);
  73. /**
  74. * Check if a user list is available or not
  75. * @return boolean if users can be listed or not
  76. */
  77. public function hasUserListings();
  78. }