summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r--modules/gallery/controllers/admin_identity.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/modules/gallery/controllers/admin_identity.php b/modules/gallery/controllers/admin_identity.php
index d06132ff..0521a0f8 100644
--- a/modules/gallery/controllers/admin_identity.php
+++ b/modules/gallery/controllers/admin_identity.php
@@ -47,23 +47,26 @@ class Admin_Identity_Controller extends Admin_Controller {
module::event("pre_identity_change", $active_provider, $new_provider);
- identity::deactivate();
+ module::deactivate($active_provider);
+ module::uninstall($active_provider);
+
+ try {
+ Session::instance()->destroy();
+ } catch (Exception $e) {
+ // We don't care if there was a problem destroying the session.
+ }
// Switch authentication
- module::set_var("gallery", "identity_provider", $new_provider);
identity::reset();
+ module::set_var("gallery", "identity_provider", $new_provider);
- identity::activate();
+ module::install($new_provider);
+ module::activate($new_provider);
// @todo this type of collation is questionable from an i18n perspective
message::success(t("Changed to %description",
array("description" => $providers->$new_provider)));
- try {
- Session::instance()->destroy();
- } catch (Exception $e) {
- // We don't care if there was a problem destroying the session.
- }
url::redirect(item::root()->abs_url());
}