1
0

ILDAPUserPlugin.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\User_LDAP;
  7. interface ILDAPUserPlugin {
  8. /**
  9. * Check if plugin implements actions
  10. * @return int
  11. *
  12. * Returns the supported actions as int to be
  13. * compared with OC_USER_BACKEND_CREATE_USER etc.
  14. */
  15. public function respondToActions();
  16. /**
  17. * Create a new user in LDAP Backend
  18. *
  19. * @param string $uid The UID of the user to create
  20. * @param string $password The password of the new user
  21. * @return bool|string
  22. */
  23. public function createUser($uid, $password);
  24. /**
  25. * Set password
  26. *
  27. * @param string $uid The username
  28. * @param string $password The new password
  29. * @return bool
  30. *
  31. * Change the password of a user
  32. */
  33. public function setPassword($uid, $password);
  34. /**
  35. * get the user's home directory
  36. * @param string $uid the username
  37. * @return boolean
  38. */
  39. public function getHome($uid);
  40. /**
  41. * get display name of the user
  42. * @param string $uid user ID of the user
  43. * @return string display name
  44. */
  45. public function getDisplayName($uid);
  46. /**
  47. * set display name of the user
  48. * @param string $uid user ID of the user
  49. * @param string $displayName new user's display name
  50. * @return string display name
  51. */
  52. public function setDisplayName($uid, $displayName);
  53. /**
  54. * checks whether the user is allowed to change his avatar in Nextcloud
  55. * @param string $uid the Nextcloud user name
  56. * @return boolean either the user can or cannot
  57. */
  58. public function canChangeAvatar($uid);
  59. /**
  60. * Count the number of users
  61. * @return int|false
  62. */
  63. public function countUsers();
  64. }