interface.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * ownCloud - user interface
  4. *
  5. * @author Arthur Schiwon
  6. * @copyright 2012 Arthur Schiwon blizzz@owncloud.org
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  10. * License as published by the Free Software Foundation; either
  11. * version 3 of the License, or any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public
  19. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. interface OC_User_Interface {
  23. /**
  24. * @brief Check if backend implements actions
  25. * @param $actions bitwise-or'ed actions
  26. * @returns boolean
  27. *
  28. * Returns the supported actions as int to be
  29. * compared with OC_USER_BACKEND_CREATE_USER etc.
  30. */
  31. public function implementsActions($actions);
  32. /**
  33. * @brief delete a user
  34. * @param $uid The username of the user to delete
  35. * @returns true/false
  36. *
  37. * Deletes a user
  38. */
  39. public function deleteUser($uid);
  40. /**
  41. * @brief Get a list of all users
  42. * @returns array with all uids
  43. *
  44. * Get a list of all users.
  45. */
  46. public function getUsers($search = '', $limit = null, $offset = null);
  47. /**
  48. * @brief check if a user exists
  49. * @param string $uid the username
  50. * @return boolean
  51. */
  52. public function userExists($uid);
  53. /**
  54. * @brief get display name of the user
  55. * @param $uid user ID of the user
  56. * @return display name
  57. */
  58. public function getDisplayName($uid);
  59. /**
  60. * @brief Get a list of all display names
  61. * @returns array with all displayNames (value) and the corresponding uids (key)
  62. *
  63. * Get a list of all display names and user ids.
  64. */
  65. public function getDisplayNames($search = '', $limit = null, $offset = null);
  66. /**
  67. * @brief Check if a user list is available or not
  68. * @return boolean if users can be listed or not
  69. */
  70. public function hasUserListings();
  71. }