| 3 |
// $Id$ |
// $Id$ |
| 4 |
// ----------------------------------------------------------------------------- |
// ----------------------------------------------------------------------------- |
| 5 |
// $Log$ |
// $Log$ |
| 6 |
|
// Revision 1.8 2002/12/28 01:16:42 jonen |
| 7 |
|
// + added clear of $this->state[autologout] at 'hadTimeout()' |
| 8 |
|
// |
| 9 |
|
// Revision 1.7 2002/12/23 11:32:28 jonen |
| 10 |
|
// + added inserting of uservars on '_create' to frontend db(needed to login user after create!) |
| 11 |
|
// + added hard link to page 'pub/register', TODO: move this out here |
| 12 |
|
// |
| 13 |
// Revision 1.6 2002/12/18 22:46:06 jonen |
// Revision 1.6 2002/12/18 22:46:06 jonen |
| 14 |
// + added function 'getUserGuid()' |
// + added function 'getUserGuid()' |
| 15 |
// (returns user's 'guid' read from database at function 'login()' (now)) |
// (returns user's 'guid' read from database at function 'login()' (now)) |
| 150 |
//print "saving to backend: " . dumpVar($result) . "<br>"; |
//print "saving to backend: " . dumpVar($result) . "<br>"; |
| 151 |
$response = $this->pObject->backend->send('createUser', array('data' => $result) ); |
$response = $this->pObject->backend->send('createUser', array('data' => $result) ); |
| 152 |
$objectId = $response[oid]; |
$objectId = $response[oid]; |
| 153 |
|
if($objectId) { |
| 154 |
|
connectdb(); |
| 155 |
|
$guid = $response[guid]; |
| 156 |
|
$username = $this->get('userData.username'); |
| 157 |
|
$password = $this->get('userData.password'); |
| 158 |
|
$sql = "INSERT into td_users VALUES ( '$objectId', '$guid', '', '$username', '$password','' )"; |
| 159 |
|
$res = send_sql($sql); |
| 160 |
|
} |
| 161 |
|
else { |
| 162 |
|
// TODO: handle this with a generic rpc-debug/pending function |
| 163 |
|
$site->session->set('register_error', 'rpc_error'); |
| 164 |
|
$site->redirect( getlink('/pub/register/') ); |
| 165 |
|
} |
| 166 |
//$this->_init($objectId); |
//$this->_init($objectId); |
| 167 |
} |
} |
| 168 |
|
|
| 242 |
$mapping_uservars2data = array_flip($def_mapping[data2uservars]); |
$mapping_uservars2data = array_flip($def_mapping[data2uservars]); |
| 243 |
foreach ($uservars as $key => $val) { |
foreach ($uservars as $key => $val) { |
| 244 |
$key_target = $mapping_uservars2data[$key]; |
$key_target = $mapping_uservars2data[$key]; |
| 245 |
//print "$key => $key_target: $val<br>"; |
if($key_target != '') { |
| 246 |
$target[$key_target] = $val; |
//print "$key => $key_target: $val<br>"; |
| 247 |
|
$target[$key_target] = $val; |
| 248 |
|
} |
| 249 |
} |
} |
| 250 |
return $target; |
return $target; |
| 251 |
} |
} |
| 352 |
} |
} |
| 353 |
|
|
| 354 |
function hadTimeout() { |
function hadTimeout() { |
| 355 |
if ($this->state[autologout]) { return 1; } |
if ($this->state[autologout]) { $this->state[autologout] = ''; return 1; } |
| 356 |
} |
} |
| 357 |
|
|
| 358 |
} |
} |