--- nfo/php/libs/org.netfrag.flib/Tracker/User.php 2002/12/12 21:34:32 1.5 +++ nfo/php/libs/org.netfrag.flib/Tracker/User.php 2002/12/18 22:46:06 1.6 @@ -1,8 +1,13 @@ pObject = new ProxyObject($this->state[id]); - if ($this->state[id]) { + $this->pObject = new ProxyObject($this->getUserGuid(), array( remote => 1, classname => "NetPerson", guid => 1) ); + if ($this->getUserGuid()) { $this->data = $this->pObject->getAttributes(); } $this->meta[data_ready] = 1; @@ -172,7 +177,7 @@ function login($user,$passwd) { connectdb(); //$sql = "SELECT * FROM td_users WHERE uname='$user'"; - $sql = "SELECT user_oid, uname, pass FROM td_users WHERE uname='$user'"; + $sql = "SELECT user_oid, guid, uname, pass FROM td_users WHERE uname='$user'"; if ($res=send_sql($sql)) { $row = mysql_fetch_array($res,MYSQL_ASSOC); if (!is_array($row)) { return 0; } @@ -181,6 +186,7 @@ //return $uservars_db; // store 1st priority user-data to state $this->state[id] = $row[user_oid]; + $this->state[guid] = $row[guid]; $this->state[status] = $this->meta[logontoken]; $this->_saveState(); $this->site->log( get_class($this) . "->login ok", LOG_DEBUG ); @@ -227,7 +233,7 @@ global $site; // get information about user from site - $userid = $this->state[id]; + $userid = $this->getUserId(); $this->site->log( get_class($this) . "->logout: userid $userid", LOG_DEBUG ); @@ -306,6 +312,9 @@ return $this->state[id]; } + function getUserGuid() { + return $this->state[guid]; + } function getPostVars() { return $this->state[postvars];