diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-12 10:07:32 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-12 10:07:32 -0800 |
commit | 4d7479dcbc3d0f658de230c139242e7176d0ba16 (patch) | |
tree | 4672690b213f3a3679b97c6b25011f848d37bb81 /plugins/OpenID/openid.php | |
parent | f72eb17304af9c2d7dac8a34b07bd2433b79c8c4 (diff) |
OpenID fixes:
- avoid notice spew when checking sreg items that weren't provided
- fix keys spec for user_openid, clears up problems with removing openid associations
- fix keys spec for user_openid_trustroot
Diffstat (limited to 'plugins/OpenID/openid.php')
-rw-r--r-- | plugins/OpenID/openid.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/OpenID/openid.php b/plugins/OpenID/openid.php index 8f949c9c5..9e02c7a88 100644 --- a/plugins/OpenID/openid.php +++ b/plugins/OpenID/openid.php @@ -225,11 +225,11 @@ function oid_update_user(&$user, &$sreg) $orig_profile = clone($profile); - if ($sreg['fullname'] && strlen($sreg['fullname']) <= 255) { + if (!empty($sreg['fullname']) && strlen($sreg['fullname']) <= 255) { $profile->fullname = $sreg['fullname']; } - if ($sreg['country']) { + if (!empty($sreg['country'])) { if ($sreg['postcode']) { # XXX: use postcode to get city and region # XXX: also, store postcode somewhere -- it's valuable! @@ -249,7 +249,7 @@ function oid_update_user(&$user, &$sreg) $orig_user = clone($user); - if ($sreg['email'] && Validate::email($sreg['email'], common_config('email', 'check_domain'))) { + if (!empty($sreg['email']) && Validate::email($sreg['email'], common_config('email', 'check_domain'))) { $user->email = $sreg['email']; } |