From 79f4469db928c0f05f14dc33a6b5a42c1b0f94f1 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 26 Aug 2008 21:05:15 -0400 Subject: [PATCH] Invite -> Invitation darcs-hash:20080827010515-84dde-f4dd776209a0aa4f6a7e9d6ac1de46d83ff54650.gz --- classes/User.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/User.php b/classes/User.php index cdb6568f0c..99ae40baf8 100644 --- a/classes/User.php +++ b/classes/User.php @@ -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); -- 2.39.5