auth-example.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. // rename file to: `config.php`
  3. // @used by User class to login
  4. // - [ ] use to fetch user groups for acl
  5. /**
  6. * User object:
  7. * - ID // ADM_ID
  8. * - ADM_ACCOUNT // AUTHORIZE_USER, ADM_ACCOUNT
  9. * - ADM_NAME // ADM_NAME
  10. * - ADM_TECH_WORKER // ADM_TECH_WORKER
  11. * - ADM_COMPANY // ADM_COMPANY
  12. * - ADM_ADMIN_LEVEL // ADM_ADMIN_LEVEL
  13. * - ADM_PHONE // ADM_PHONE
  14. * - ADM_ADMIN_EXPIRE // ADM_ADMIN_EXPIRE
  15. * - ADM_ADMIN_DESC // ADM_ADMIN_DESC
  16. * - EMPLOYEE_TYPE // EMPLOYEE_TYPE
  17. * - EMAIL_IMAP_IMPORT_HOST // EMAIL_IMAP_IMPORT_HOST
  18. * - EMAIL_IMAP_IMPORT_USERNAME // EMAIL_IMAP_IMPORT_USERNAME
  19. */
  20. class Theme_Auth_Base { // TODO: implements AuthBaseInterface {
  21. static function auth($login, $pass) { // @return User object or null
  22. return null;
  23. return (object)[
  24. 'ID' => "", // ADM_ID
  25. 'ADM_ACCOUNT' => "", // AUTHORIZE_USER, ADM_ACCOUNT
  26. 'ADM_NAME' => "", // ADM_NAME
  27. 'ADM_TECH_WORKER' => "", // ADM_TECH_WORKER
  28. 'ADM_COMPANY' => "", // ADM_COMPANY
  29. 'ADM_ADMIN_LEVEL' => "", // ADM_ADMIN_LEVEL
  30. 'ADM_PHONE' => "", // ADM_PHONE
  31. 'ADM_ADMIN_EXPIRE' => "", // ADM_ADMIN_EXPIRE
  32. 'ADM_ADMIN_DESC' => "", // ADM_ADMIN_DESC
  33. 'EMPLOYEE_TYPE' => "", // EMPLOYEE_TYPE
  34. ];
  35. }
  36. }