projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check what is being written to our log files.
[Pman.Core]
/
DataObjects
/
Core_person_signup.php
diff --git
a/DataObjects/Core_person_signup.php
b/DataObjects/Core_person_signup.php
index
af23ce6
..
a59f67d
100644
(file)
--- a/
DataObjects/Core_person_signup.php
+++ b/
DataObjects/Core_person_signup.php
@@
-3,7
+3,7
@@
/**
* Table Definition for Person
*/
/**
* Table Definition for Person
*/
-require_once 'DB/DataObject.php';
+
class_exists('DB_DataObject') ? '' :
require_once 'DB/DataObject.php';
class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
{
class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
{
@@
-27,6
+27,8
@@
class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
public $person_id;
public $person_table;
public $person_id;
public $person_table;
+
+ public $inviter_id;
function convertTo($target = false)
{
function convertTo($target = false)
{
@@
-38,12
+40,7
@@
class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
$old = clone($this);
// this shold not really happen...
if($target->get('email', $this->email)){
$old = clone($this);
// this shold not really happen...
if($target->get('email', $this->email)){
-
- $this->person_id = $target->id;
- $this->person_table = $target->tableName();
- $this->update($old);
-
- return $target;
+ return false;
}
$target->setFrom($this->toArray());
}
$target->setFrom($this->toArray());
@@
-53,23
+50,23
@@
class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
$this->person_id = $target->id;
$this->person_table = $target->tableName();
$this->update($old);
$this->person_id = $target->id;
$this->person_table = $target->tableName();
$this->update($old);
- // ok - deleting might not be a great idea.... - as we can not track already confirmed codes..
- //$this->delete();
+ if(!empty($this->inviter_id) && method_exists($target, 'createFriend')){
+ $target->createFriend($this->inviter_id);
+ }
return $target;
}
function sendVerification($template, $roo)
{
return $target;
}
function sendVerification($template, $roo)
{
-
$content = array(
'template' => $template,
'person' => $this,
'serverName' => $_SERVER['SERVER_NAME'],
'baseURL' => $roo->baseURL
);
$content = array(
'template' => $template,
'person' => $this,
'serverName' => $_SERVER['SERVER_NAME'],
'baseURL' => $roo->baseURL
);
-
+
$sent = DB_DataObject::factory('core_email')->send($content);
if(!is_object($sent)){
$sent = DB_DataObject::factory('core_email')->send($content);
if(!is_object($sent)){