1: <?php
2: /**
3: * This code is licensed under AGPLv3 license or Afterlogic Software License
4: * if commercial version of the product was purchased.
5: * For full statements of the licenses see LICENSE-AFTERLOGIC and LICENSE-AGPL3 files.
6: */
7:
8: namespace Aurora\Modules\StandardLoginFormWebclient;
9:
10: /**
11: * Displays standard login form with ability to pass login and password.
12: *
13: * @license https://www.gnu.org/licenses/agpl-3.0.html AGPL-3.0
14: * @license https://afterlogic.com/products/common-licensing Afterlogic Software License
15: * @copyright Copyright (c) 2023, Afterlogic Corp.
16: *
17: * @property Settings $oModuleSettings
18: *
19: * @package Modules
20: */
21: class Module extends \Aurora\System\Module\AbstractWebclientModule
22: {
23: /***** public functions might be called with web API *****/
24: /**
25: * @return Module
26: */
27: public static function getInstance()
28: {
29: return parent::getInstance();
30: }
31:
32: /**
33: * @return Module
34: */
35: public static function Decorator()
36: {
37: return parent::Decorator();
38: }
39:
40: /**
41: * @return Settings
42: */
43: public function getModuleSettings()
44: {
45: return $this->oModuleSettings;
46: }
47:
48: /**
49: * Obtains list of module settings for authenticated user.
50: *
51: * @return array
52: */
53: public function GetSettings()
54: {
55: \Aurora\System\Api::checkUserRoleIsAtLeast(\Aurora\System\Enums\UserRole::Anonymous);
56:
57: return array(
58: 'ServerModuleName' => $this->oModuleSettings->ServerModuleName,
59: 'HashModuleName' => $this->oModuleSettings->HashModuleName,
60: 'CustomLoginUrl' => $this->oModuleSettings->CustomLoginUrl,
61: 'DemoLogin' => $this->oModuleSettings->DemoLogin,
62: 'DemoPassword' => $this->oModuleSettings->DemoPassword,
63: 'InfoText' => $this->oModuleSettings->InfoText,
64: 'BottomInfoHtmlText' => $this->oModuleSettings->BottomInfoHtmlText,
65: 'LoginSignMeType' => $this->oModuleSettings->LoginSignMeType,
66: 'AllowChangeLanguage' => $this->oModuleSettings->AllowChangeLanguage,
67: 'UseDropdownLanguagesView' => $this->oModuleSettings->UseDropdownLanguagesView,
68: );
69: }
70:
71: public function Login($Login, $Password, $Language = '', $SignMe = false)
72: {
73: $mResult = \Aurora\Modules\Core\Module::Decorator()->Login($Login, $Password, $Language, $SignMe);
74:
75:
76: return $mResult;
77: }
78: /***** public functions might be called with web API *****/
79: }
80: