Changeset 893 for trunk/Modules/FrontPage
- Timestamp:
- Mar 6, 2023, 1:48:45 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FrontPage/FrontPage.php
r888 r893 29 29 function HandleLoginForm() 30 30 { 31 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 31 32 global $Message, $MessageType; 32 33 … … 39 40 if (array_key_exists('StayLogged', $_POST)) $StayLogged = true; 40 41 else $StayLogged = false; 41 $ this->System->User->Login($_POST['LoginUser'], $_POST['LoginPass'], $StayLogged);42 if ($ this->System->User->Role == LICENCE_ANONYMOUS)42 $User->Login($_POST['LoginUser'], $_POST['LoginPass'], $StayLogged); 43 if ($User->Role == LICENCE_ANONYMOUS) 43 44 { 44 45 $Message = T('Incorrect name or password'); … … 46 47 } else 47 48 { 48 $Message = sprintf(T('Login successful. Welcome <strong>%s</strong>!'), $ this->System->User->Name);49 $Message = sprintf(T('Login successful. Welcome <strong>%s</strong>!'), $User->Name); 49 50 $MessageType = MESSAGE_INFORMATION; 50 51 } … … 55 56 } 56 57 } else 57 if ($_GET['action'] == 'logout') 58 if ($_GET['action'] == 'logout') 59 { 60 if ($User->Role != LICENCE_ANONYMOUS) 58 61 { 59 if ($this->System->User->Role != LICENCE_ANONYMOUS) 60 { 61 $this->System->ModuleManager->Modules['Log']->WriteLog('Odhlášení', LOG_TYPE_USER); 62 $this->System->User->Logout(); 63 $Message = T('You were logged out'); 64 $MessageType = MESSAGE_INFORMATION; 65 } 62 ModuleLog::Cast($this->System->GetModule('Log'))->WriteLog('Odhlášení', LOG_TYPE_USER); 63 $User->Logout(); 64 $Message = T('You were logged out'); 65 $MessageType = MESSAGE_INFORMATION; 66 66 } 67 } 67 68 } 68 69 } … … 123 124 // Echo text even if it is hidden because of caching by external searching engines 124 125 return '<div style="'.$HideWelcome.'">'. 125 '<div id="bannertitle">'. $this->System->Config['Web']['Title'].'</div>'.126 '<div id="bannertitle">'.Core::Cast($this->System)->Config['Web']['Title'].'</div>'. 126 127 T('Open web system for translation texts from game World of Warcraft (WoW).<br/>'. 127 128 '<ul>'.
Note:
See TracChangeset
for help on using the changeset viewer.