note converted user id on registration

This commit is contained in:
Evan Prodromou 2011-05-23 17:25:00 -04:00
parent b0b8d36439
commit c85eeb868e
2 changed files with 15 additions and 0 deletions

View File

@ -23,4 +23,11 @@ class Invitation extends Memcached_DataObject
/* the code above is auto generated do not remove the tag below */ /* the code above is auto generated do not remove the tag below */
###END_AUTOCODE ###END_AUTOCODE
function convert($user)
{
$orig = clone($this);
$this->registered_user_id = $user->id;
return $this->update($orig);
}
} }

View File

@ -263,6 +263,8 @@ class User extends Memcached_DataObject
$user->nickname = $nickname; $user->nickname = $nickname;
$invite = null;
// Users who respond to invite email have proven their ownership of that address // Users who respond to invite email have proven their ownership of that address
if (!empty($code)) { if (!empty($code)) {
@ -353,6 +355,12 @@ class User extends Memcached_DataObject
return false; return false;
} }
// Mark that this invite was converted
if (!empty($invite)) {
$invite->convert($user);
}
if (!empty($email) && !$user->email) { if (!empty($email) && !$user->email) {
$confirm = new Confirm_address(); $confirm = new Confirm_address();