diff options
author | Leslie Michael Orchard <l.m.orchard@pobox.com> | 2009-02-17 23:22:56 -0500 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-02-20 16:37:59 -0500 |
commit | 9a0e71f9bf3329004949a0cef61abb5a354c7688 (patch) | |
tree | d802c62bbc5709447e0bc582ea5ef394cd84f24d /classes | |
parent | 17a6e6603058d412f3c3a7c6800f5d47fcf0def0 (diff) |
Fixing a bunch of undefined variable warnings in OpenID signup process
Diffstat (limited to 'classes')
-rw-r--r-- | classes/User.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/classes/User.php b/classes/User.php index 495a98236..40cf18df6 100644 --- a/classes/User.php +++ b/classes/User.php @@ -183,16 +183,16 @@ class User extends Memcached_DataObject $profile->nickname = $nickname; $profile->profileurl = common_profile_url($nickname); - if ($fullname) { + if (!empty($fullname)) { $profile->fullname = $fullname; } - if ($homepage) { + if (!empty($homepage)) { $profile->homepage = $homepage; } - if ($bio) { + if (!empty($bio)) { $profile->bio = $bio; } - if ($location) { + if (!empty($location)) { $profile->location = $location; } @@ -200,7 +200,7 @@ class User extends Memcached_DataObject $id = $profile->insert(); - if (!$id) { + if (empty($id)) { common_log_db_error($profile, 'INSERT', __FILE__); return false; } @@ -210,13 +210,13 @@ class User extends Memcached_DataObject $user->id = $id; $user->nickname = $nickname; - if ($password) { # may not have a password for OpenID users + if (!empty($password)) { # may not have a password for OpenID users $user->password = common_munge_password($password, $id); } # Users who respond to invite email have proven their ownership of that address - if ($code) { + if (!empty($code)) { $invite = Invitation::staticGet($code); if ($invite && $invite->address && $invite->address_type == 'email' && $invite->address == $email) { $user->email = $invite->address; @@ -253,7 +253,7 @@ class User extends Memcached_DataObject return false; } - if ($email && !$user->email) { + if (!empty($email) && !$user->email) { $confirm = new Confirm_address(); $confirm->code = common_confirmation_code(128); @@ -268,7 +268,7 @@ class User extends Memcached_DataObject } } - if ($code && $user->email) { + if (!empty($code) && $user->email) { $user->emailChanged(); } |