diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-31 14:23:05 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-31 14:23:05 -0700 |
commit | 903b5f6f67faaf8d8b25d8efd279f0ebe669f4d2 (patch) | |
tree | 8896948042189818a6ab9c1e24397f9804780bd7 /modules/gallery/helpers/gallery_event.php | |
parent | 80b892915f7286d3cb8daef3ba12c012738cef28 (diff) |
Add identity_change handlers to resolve the ownership issues of comments, subscription, items and tasks.
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
-rw-r--r-- | modules/gallery/helpers/gallery_event.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index 7e0382ec..f3ad1630 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -35,6 +35,13 @@ class gallery_event_Core { $db->query("UPDATE {items} SET owner_id = {$admin->id} where owner_id = {$user->id}"); } + static function identity_provider_changed($old_provider, $new_provider) { + $admin = identity::admin_user(); + $db = Database::instance(); + $db->query("UPDATE {tasks} SET owner_id = {$admin->id}"); + $db->query("UPDATE {items} SET owner_id = {$admin->id}"); + } + static function group_created($group) { access::add_group($group); } |