projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5876611
)
DataObjects/Core_person_signup.php
author
Edward
<edward@roojs.com>
Thu, 26 Mar 2015 07:13:52 +0000
(15:13 +0800)
committer
Edward
<edward@roojs.com>
Thu, 26 Mar 2015 07:13:52 +0000
(15:13 +0800)
DataObjects/Core_person_signup.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_person_signup.php
b/DataObjects/Core_person_signup.php
index
884c6f8
..
bb6e010
100644
(file)
--- a/
DataObjects/Core_person_signup.php
+++ b/
DataObjects/Core_person_signup.php
@@
-56,14
+56,8
@@
class Pman_Core_DataObjects_Core_person_signup extends DB_DataObject
$this->person_table = $target->tableName();
$this->update($old);
$this->person_table = $target->tableName();
$this->update($old);
- if(!empty($this->invite_id) && !empty($this->invite_table)){
- $friend = DB_DataObject::factory($this->invite_table);
- $friend->setFrom(array(
- 'person_id' => $this->invite_id,
- 'friend_id' => $target->id
- ));
-
- $friend->insert();
+ if(!empty($this->inviter_id) && method_exists($target, 'createFriend')){
+ $target->createFriend($this->inviter_id);
}
return $target;
}
return $target;