users.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /*
  3. FusionPBX
  4. Version: MPL 1.1
  5. The contents of this file are subject to the Mozilla Public License Version
  6. 1.1 (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.mozilla.org/MPL/
  9. Software distributed under the License is distributed on an "AS IS" basis,
  10. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. for the specific language governing rights and limitations under the
  12. License.
  13. The Original Code is FusionPBX
  14. The Initial Developer of the Original Code is
  15. Mark J Crane <[email protected]>
  16. Portions created by the Initial Developer are Copyright (C) 2016
  17. the Initial Developer. All Rights Reserved.
  18. Contributor(s):
  19. Mark J Crane <[email protected]>
  20. */
  21. /**
  22. * users class provides methods for adding and removing users
  23. *
  24. * @method string add
  25. * @method boolean delete
  26. */
  27. if (!class_exists('users')) {
  28. class users {
  29. /**
  30. * Called when the object is created
  31. */
  32. public function __construct() {
  33. //place holder
  34. }
  35. /**
  36. * Called when there are no references to a particular object
  37. * unset the variables used in the class
  38. */
  39. public function __destruct() {
  40. foreach ($this as $key => $value) {
  41. unset($this->$key);
  42. }
  43. }
  44. /**
  45. * add a user
  46. */
  47. public function add($username, $password) {
  48. $id = uuid();
  49. //return $id;
  50. return false;
  51. }
  52. /**
  53. * delete a user
  54. */
  55. public function delete($id) {
  56. return false;
  57. }
  58. } //end scripts class
  59. }
  60. /*
  61. //example use
  62. $user = new users;
  63. $user->add($username, $password);
  64. */
  65. ?>