diff options
Diffstat (limited to 'classes/User.php')
-rw-r--r-- | classes/User.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/classes/User.php b/classes/User.php index cdb6568f0..99ae40baf 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); |