Ignore:
Timestamp:
Jan 19, 2014, 12:43:49 AM (10 years ago)
Author:
chronos
Message:
  • Opraveno: Namísto číselného id anonyma používat null hodnotu.
Location:
branches/php
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/php

    • Property svn:ignore
      •  

        old new  
        1 
        21config.php
        3 
        42error.log
         3.project
  • branches/php/Base/User.php

    r22 r111  
    1111  function LoadData()
    1212  {
    13     $DbResult = $this->System->Database->select('User', '*', 'Id='.$this->Id);
    14     if($DbResult->num_rows > 0)
    15     {
    16       $this->Data = $DbResult->fetch_assoc();
    17       if($this->Data['Rank'] == '') $this->Data['Rank'] = 0;
    18     } else throw new Exception('User with id '.$this->Id.' not found');
     13        if($this->Id != null)
     14        {
     15      $DbResult = $this->System->Database->select('User', '*', 'Id='.$this->Id);
     16      if($DbResult->num_rows > 0)
     17      {
     18        $this->Data = $DbResult->fetch_assoc();
     19        if($this->Data['Rank'] == '') $this->Data['Rank'] = 0;
     20      } else throw new Exception('User with id '.$this->Id.' not found');
     21        } else $this->Data = array();
    1922  }
    2023
Note: See TracChangeset for help on using the changeset viewer.