diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-22 22:29:56 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-22 22:30:25 -0700 |
commit | b74b131e25ca0ddb42d2545a5d0ea2d796452f1d (patch) | |
tree | 68dda2e42827b7c92b947ed6b56816c429682249 /modules/gallery/controllers/admin_identity.php | |
parent | 89ca1590e4435da56fc15c74fcff74b467bb8717 (diff) |
Change Identity adminstration to use the uninstall/install methods when changing providers.
Diffstat (limited to 'modules/gallery/controllers/admin_identity.php')
-rw-r--r-- | modules/gallery/controllers/admin_identity.php | 19 |
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()); } |