example.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * ownCloud
  4. *
  5. * @author Frank Karlitschek
  6. * @copyright 2010 Frank Karlitschek karlitschek@kde.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. /**
  23. * abstract reference class for user management
  24. * this class should only be used as a reference for method signatures and their descriptions
  25. */
  26. abstract class OC_User_Example extends OC_User_Backend {
  27. /**
  28. * @brief Create a new user
  29. * @param $uid The username of the user to create
  30. * @param $password The password of the new user
  31. * @returns true/false
  32. *
  33. * Creates a new user. Basic checking of username is done in OC_User
  34. * itself, not in its subclasses.
  35. */
  36. public function createUser($uid, $password){
  37. return OC_USER_BACKEND_NOT_IMPLEMENTED;
  38. }
  39. /**
  40. * @brief delete a user
  41. * @param $uid The username of the user to delete
  42. * @returns true/false
  43. *
  44. * Deletes a user
  45. */
  46. public function deleteUser( $uid ){
  47. return OC_USER_BACKEND_NOT_IMPLEMENTED;
  48. }
  49. /**
  50. * @brief Set password
  51. * @param $uid The username
  52. * @param $password The new password
  53. * @returns true/false
  54. *
  55. * Change the password of a user
  56. */
  57. public function setPassword($uid, $password){
  58. return OC_USER_BACKEND_NOT_IMPLEMENTED;
  59. }
  60. /**
  61. * @brief Check if the password is correct
  62. * @param $uid The username
  63. * @param $password The password
  64. * @returns true/false
  65. *
  66. * Check if the password is correct without logging in the user
  67. */
  68. public function checkPassword($uid, $password){
  69. return OC_USER_BACKEND_NOT_IMPLEMENTED;
  70. }
  71. /**
  72. * @brief Get a list of all users
  73. * @returns array with all uids
  74. *
  75. * Get a list of all users.
  76. */
  77. public function getUsers(){
  78. return OC_USER_BACKEND_NOT_IMPLEMENTED;
  79. }
  80. /**
  81. * @brief check if a user exists
  82. * @param string $uid the username
  83. * @return boolean
  84. */
  85. public function userExists($uid){
  86. return OC_USER_BACKEND_NOT_IMPLEMENTED;
  87. }
  88. }