/[cvs]/nfo/php/libs/org.netfrag.flib/Tracker/User.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.flib/Tracker/User.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by joko, Wed Jul 2 11:02:09 2003 UTC revision 1.15 by jonen, Thu Mar 11 21:04:48 2004 UTC
# Line 13  Line 13 
13  //    $Id$  //    $Id$
14  //    -----------------------------------------------------------------------------  //    -----------------------------------------------------------------------------
15  //    $Log$  //    $Log$
16    //    Revision 1.15  2004/03/11 21:04:48  jonen
17    //    +changed backend-functions to only get/save User ONLY not SOME object (security!)
18    //
19  //    Revision 1.14  2003/07/02 11:02:09  joko  //    Revision 1.14  2003/07/02 11:02:09  joko
20  //    + fixed bug with create/_create  //    + fixed bug with create/_create
21  //  //
# Line 145  class User { Line 148  class User {
148      $this->meta[data_ready] = 1;      $this->meta[data_ready] = 1;
149      //$this->pObject = new ProxyObject($this->getUserGuid(), array( remote => 1, classname => "NetPerson", guid => 1) );      //$this->pObject = new ProxyObject($this->getUserGuid(), array( remote => 1, classname => "NetPerson", guid => 1) );
150      $rpcinfo = $this->site->configuration->get("rpcinfo");      $rpcinfo = $this->site->configuration->get("rpcinfo");
151      $this->pObject = mkObject('DesignPattern::RemoteProxy', $this->getUserGuid(), array( remote => 1, classname => "NetPerson", guid => 1, rpcinfo => $rpcinfo, cache => array( db => 1, session => 1 ), connect => 1 ) );      //$this->pObject = mkObject('DesignPattern::RemoteProxy', $this->getUserGuid(), array( remote => 1, classname => "NetPerson", guid => 1, rpcinfo => $rpcinfo, cache => array( db => 1, session => 1 ), connect => 1 ) );
152      if ($this->getUserGuid()) {      $this->pObject = mkObject('DesignPattern::RemoteProxy', $this->getUserGuid(), array( key => 1, command => 'getUser', query => $this->getUserGuid(), remote => 1, rpcinfo => $rpcinfo, cache => array( db => 1, session => 1 ), connect => 1 ) );
153         if ($this->getUserGuid()) {
154        $this->data = $this->pObject->getResult();        $this->data = $this->pObject->getResult();
155      }      }
156    }    }
# Line 166  class User { Line 170  class User {
170        
171    function _save($type = '') {    function _save($type = '') {
172  //print Dumper($this->data);  //print Dumper($this->data);
173      $this->pObject->save($this->data, $type);      //$this->pObject->save($this->data, $type);
174        // new of 2004-03-08: don't use generic 'saveObject'!!
175        //   for security reasons disabled at ClientBackend!!!
176        if($type == 'commit') {
177          $args = array( 'guid' => $this->data[guid], 'data' => $this->data );
178          $this->pObject->backend->send('saveUser', $args, array( utf8 => 1) );
179        }      
180      // invalidate data only if it's not for caching purposes      // invalidate data only if it's not for caching purposes
181      if ($type != 'cache') {      if ($type != 'cache') {
182        $this->meta[data_ready] = 0;        $this->meta[data_ready] = 0;

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed