Ignore:
Timestamp:
Jan 22, 2012, 9:17:36 PM (13 years ago)
Author:
chronos
Message:
  • Opraveno: Instalace anonymního uživatele.
  • Opraveno: Odkazy na model User.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/User/User.php

    r378 r381  
    33include(dirname(__FILE__).'/UserList.php');
    44include(dirname(__FILE__).'/UserPermission.php');
     5
     6define('ANONYMOUS_ID', 1);
    57
    68define('LOGIN_USED', 'Přihlašovací jméno již použito.');
     
    3436  var $Roles = array();
    3537  var $User = array();
    36   var $DefaultRole = 2;
    37   var $AnonymousUserId = 98;
     38  var $AnonymousUserId = 1;
    3839  var $OnlineStateTimeout = 600; // in seconds
    3940  var $PermissionCache = array();
     
    380381  function Init()
    381382  {     
    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;
    383385    $this->System->Pages['uzivatele'] = 'UserListPage';
    384     if(isset($_SERVER['REMOTE_ADDR'])) $this->System->Models['User']->Check();
     386    if(isset($_SERVER['REMOTE_ADDR'])) $this->System->Modules['User']->Models['User']->Check();
    385387  }
    386388 
     
    388390  {
    389391    parent::Install();
     392    $this->Database->insert('User', array('Id' => ANONYMOUS_ID, 'Login' => 'Anonymous', 'Name' => 'Anonymous',
     393      'Password' => ''));
    390394  }
    391395
Note: See TracChangeset for help on using the changeset viewer.