From fef5cf9865962ce9fed583752c0671a0a5e090cf Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 7 Jun 2010 07:09:39 -0700 Subject: [PATCH] If the identity provider changes then delete all the rest user_access_keys, as they are no longer valid. (i.e. all the related users have been deleted.) --- modules/rest/helpers/rest_event.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/rest/helpers/rest_event.php b/modules/rest/helpers/rest_event.php index e4e53ef677..f23b9a5848 100644 --- a/modules/rest/helpers/rest_event.php +++ b/modules/rest/helpers/rest_event.php @@ -29,6 +29,13 @@ static function user_before_delete($user) { ->execute(); } + + static function change_provider($new_provider) { + db::build() + ->delete("user_access_keys") + ->execute(); + } + /** * Called after a user has been added. Just add a remote access key * on every add.