Invite -> Invitation

darcs-hash:20080827010515-84dde-f4dd776209a0aa4f6a7e9d6ac1de46d83ff54650.gz
This commit is contained in:
Evan Prodromou 2008-08-26 21:05:15 -04:00
parent c55e3089c5
commit 79f4469db9

View File

@ -200,8 +200,8 @@ class User extends DB_DataObject
# Users who respond to invite email have proven their ownership of that address
if ($code) {
$invite = Invite::staticGet($code);
if ($invite && $invite->address && $invite->address_type == 'email') {
$invite = Invitation::staticGet($code);
if ($invite && $invite->address && $invite->address_type == 'email' && $invite->address == $email) {
$user->email = $invite->address;
}
}
@ -230,7 +230,7 @@ class User extends DB_DataObject
return FALSE;
}
if ($email && !$code) {
if ($email && !$user->email) {
$confirm = new Confirm_address();
$confirm->code = common_confirmation_code(128);
@ -251,7 +251,7 @@ class User extends DB_DataObject
$profile->query('COMMIT');
if ($email && !$code) {
if ($email && !$user->email) {
mail_confirm_address($confirm->code,
$profile->nickname,
$email);