summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-06-07 07:09:39 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-06-07 07:09:39 -0700
commitfef5cf9865962ce9fed583752c0671a0a5e090cf (patch)
tree1df3de297224f17b3b206c822dc973b5f60f25cb
parent1d91e1b2dc8456681f9e38baaca1d191cff1ac7a (diff)
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.)
-rw-r--r--modules/rest/helpers/rest_event.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/rest/helpers/rest_event.php b/modules/rest/helpers/rest_event.php
index e4e53ef6..f23b9a58 100644
--- a/modules/rest/helpers/rest_event.php
+++ b/modules/rest/helpers/rest_event.php
@@ -29,6 +29,13 @@ class rest_event {
->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.