BxUnaConConfig.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaConnect UNA Connect
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxUnaConConfig extends BxBaseModConnectConfig
  12. {
  13. public $sApiID;
  14. public $sApiSecret;
  15. public $sApiUrl;
  16. public $sPageStart;
  17. public $sPageHandle;
  18. public $sScope = 'basic';
  19. function __construct($aModule)
  20. {
  21. parent::__construct($aModule);
  22. $this -> sApiID = getParam('bx_unacon_api_key');
  23. $this -> sApiSecret = getParam('bx_unacon_secret');
  24. $this -> sApiUrl = trim(getParam('bx_unacon_url'), '/') . (getParam('bx_unacon_url_rewrite') ? '/m/oauth2/' : '/modules/?r=oauth2/');
  25. $this -> sSessionUid = 'unacon_session';
  26. $this -> sSessionProfile = 'unacon_session_profile';
  27. $this -> sEmailTemplatePasswordGenerated = 'bx_unacon_password_generated';
  28. $this -> sDefaultTitleLangKey = '_bx_unacon';
  29. $this -> sRedirectPage = getParam('bx_unacon_redirect_page');
  30. $this -> sProfilesModule = getParam('bx_unacon_module');
  31. $this -> isAlwaysConfirmEmail = (bool)getParam('bx_unacon_confirm_email');
  32. $this -> isAlwaysAutoApprove = (bool)getParam('bx_unacon_approve');
  33. $this -> bAutoFriends = (bool)getParam('bx_unacon_auto_friends');
  34. $this -> sPageStart = BX_DOL_URL_ROOT . $this -> getBaseUri() . 'start';
  35. $this -> sPageHandle = BX_DOL_URL_ROOT . $this -> getBaseUri() . 'handle';
  36. }
  37. }
  38. /** @} */