| 13 |
// $Id$ |
// $Id$ |
| 14 |
// ----------------------------------------------------------------------------- |
// ----------------------------------------------------------------------------- |
| 15 |
// $Log$ |
// $Log$ |
| 16 |
|
// Revision 1.22 2004/11/17 16:14:47 jonen |
| 17 |
|
// + minor changes related to utf8 encoding |
| 18 |
|
// |
| 19 |
|
// Revision 1.21 2004/11/03 14:13:21 jonen |
| 20 |
|
// small changes at create function |
| 21 |
|
// |
| 22 |
|
// Revision 1.20 2004/10/07 14:08:51 jonen |
| 23 |
|
// + bufix related to save new-registered user-data |
| 24 |
|
// |
| 25 |
// Revision 1.19 2004/06/22 09:18:47 jonen |
// Revision 1.19 2004/06/22 09:18:47 jonen |
| 26 |
// removed debug dumps |
// removed debug dumps |
| 27 |
// |
// |
| 184 |
} |
} |
| 185 |
|
|
| 186 |
$this->_save("cache"); |
$this->_save("cache"); |
| 187 |
|
//$this->_save("commit"); |
| 188 |
|
|
| 189 |
//$this->pObject->flushProxy(); // done in "pObject->save" |
//$this->pObject->flushProxy(); // done in "pObject->save" |
| 190 |
|
|
| 221 |
} |
} |
| 222 |
|
|
| 223 |
function create() { |
function create() { |
| 224 |
$this->_save(); |
// How THIS can function??? we will fool ourselves... |
| 225 |
$attr = $this->pObject->getResult(); |
//$this->_save(); |
| 226 |
//print DumpVar($attr); |
//$attr = $this->pObject->getResult(); |
| 227 |
$this->_create($attr); |
$this->_create($this->data); |
| 228 |
} |
} |
| 229 |
|
|
| 230 |
function createGuest() { |
function createGuest() { |
| 239 |
function _create($result) { |
function _create($result) { |
| 240 |
global $site; |
global $site; |
| 241 |
//print "saving to backend: " . dumpVar($result) . "<br>"; |
//print "saving to backend: " . dumpVar($result) . "<br>"; |
| 242 |
$response = $this->pObject->backend->send('createUser', array('data' => $result) ); |
$response = $this->pObject->backend->send('createUser', array('data' => $result), array( utf8 => 1) ); |
| 243 |
$objectId = $response[oid]; |
$objectId = $response[oid]; |
| 244 |
if($objectId) { |
if($objectId) { |
| 245 |
connectdb(); |
connectdb(); |
| 251 |
} |
} |
| 252 |
else { |
else { |
| 253 |
// TODO: handle this with a generic rpc-debug/pending function |
// TODO: handle this with a generic rpc-debug/pending function |
| 254 |
$site->session->set('register_error', 'rpc_error'); |
$site->session->set('commit_error', array( form => getlt('page/register/notify/rpc_error') )); |
| 255 |
$site->redirect( getlink('/pub/register/') ); |
$site->redirect( getlink('/pub/register/') ); |
| 256 |
} |
} |
| 257 |
//$this->_init($objectId); |
//$this->_init($objectId); |