Changeset 381
- Timestamp:
- Jan 22, 2012, 9:17:36 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Page.php
r364 r381 158 158 if($this->System->Config['Web']['UserSupport'] == 1) 159 159 { 160 if($this->System->Mod els['User']->User['Id'] == $this->System->Models['User']->AnonymousUserId)160 if($this->System->Modules['User']->Models['User']->User['Id'] == $this->System->Modules['User']->Models['User']->AnonymousUserId) 161 161 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=LoginForm">Přihlášení</a> <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserRegister">Registrace</a>'; 162 else $Output .= $this->System->Mod els['User']->User['Name'].' <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=Logout">Odhlásit</a>';162 else $Output .= $this->System->Modules['User']->Models['User']->User['Name'].' <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=Logout">Odhlásit</a>'; 163 163 } else $Output .= ' '; 164 164 // <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Nastavení</a>'; -
trunk/Modules/User/User.php
r378 r381 3 3 include(dirname(__FILE__).'/UserList.php'); 4 4 include(dirname(__FILE__).'/UserPermission.php'); 5 6 define('ANONYMOUS_ID', 1); 5 7 6 8 define('LOGIN_USED', 'Přihlašovací jméno již použito.'); … … 34 36 var $Roles = array(); 35 37 var $User = array(); 36 var $DefaultRole = 2; 37 var $AnonymousUserId = 98; 38 var $AnonymousUserId = 1; 38 39 var $OnlineStateTimeout = 600; // in seconds 39 40 var $PermissionCache = array(); … … 380 381 function Init() 381 382 { 382 $this->System->Models['User'] = new User($this->Database, $this->System); 383 $this->System->Modules['User']->Models['User'] = new User($this->Database, $this->System); 384 $thus->System->Modules['User']->Models['User']->AnonymousUserId = ANONYMOUS_ID; 383 385 $this->System->Pages['uzivatele'] = 'UserListPage'; 384 if(isset($_SERVER['REMOTE_ADDR'])) $this->System->Mod els['User']->Check();386 if(isset($_SERVER['REMOTE_ADDR'])) $this->System->Modules['User']->Models['User']->Check(); 385 387 } 386 388 … … 388 390 { 389 391 parent::Install(); 392 $this->Database->insert('User', array('Id' => ANONYMOUS_ID, 'Login' => 'Anonymous', 'Name' => 'Anonymous', 393 'Password' => '')); 390 394 } 391 395
Note:
See TracChangeset
for help on using the changeset viewer.