diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-24 14:57:13 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-24 14:57:13 -0800 |
commit | cc912935731c216a57e4c291548ec503a0c1607e (patch) | |
tree | 0ebfdf14a4f8cd183df31cde5be8e3226641d580 /modules/comment/helpers | |
parent | 5b84919d6e55a8c43f60cf8b695c3696340d001b (diff) | |
parent | eb32e1052df4da268f01a84b809d756d9c9b85b7 (diff) |
Merge branch 'bharat_dev' of git@github.com:gallery/gallery3 into bharat_dev
Diffstat (limited to 'modules/comment/helpers')
-rw-r--r-- | modules/comment/helpers/comment_event.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/comment/helpers/comment_event.php b/modules/comment/helpers/comment_event.php index 43a30d70..bd336cda 100644 --- a/modules/comment/helpers/comment_event.php +++ b/modules/comment/helpers/comment_event.php @@ -27,14 +27,16 @@ class comment_event_Core { static function user_deleted($user) { $guest = identity::guest(); - db::build() - ->update("comments") - ->set("author_id", $guest->id) - ->set("guest_email", null) - ->set("guest_name", "guest") - ->set("guest_url", null) - ->where("author_id", "=", $user->id) - ->execute(); + if (!empty($guest)) { // could be empty if there is not identity provider + db::build() + ->update("comments") + ->set("author_id", $guest->id) + ->set("guest_email", null) + ->set("guest_name", "guest") + ->set("guest_url", null) + ->where("author_id", "=", $user->id) + ->execute(); + } } static function identity_provider_changed($old_provider, $new_provider) { |