From b74b131e25ca0ddb42d2545a5d0ea2d796452f1d Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 22 Oct 2009 22:29:56 -0700 Subject: Change Identity adminstration to use the uninstall/install methods when changing providers. --- modules/gallery/helpers/identity.php | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'modules/gallery/helpers/identity.php') diff --git a/modules/gallery/helpers/identity.php b/modules/gallery/helpers/identity.php index cf84c8a9..d0cba8e7 100644 --- a/modules/gallery/helpers/identity.php +++ b/modules/gallery/helpers/identity.php @@ -39,6 +39,16 @@ class identity_Core { return self::$available; } + /** + * Frees the current instance of the identity provider so the next call to instance will reload + * + * @param string configuration + * @return Identity_Core + */ + static function reset() { + IdentityProvider::reset(); + } + /** * Make sure that we have a session and group_ids cached in the session. */ @@ -71,12 +81,12 @@ class identity_Core { $session->set("group_ids", $ids); } //} catch (Exception $e) { - //try { - //Session::instance()->destroy(); - //} catch (Exception $e) { + // 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()); + // } + // url::redirect(item::root()->abs_url()); //} } @@ -125,20 +135,6 @@ class identity_Core { return IdentityProvider::instance()->is_writable(); } - /** - * @see IdentityProvider_Driver::activate. - */ - static function activate() { - IdentityProvider::instance()->activate(); - } - - /** - * @see IdentityProvider_Driver::deactivate. - */ - static function deactivate() { - IdentityProvider::instance()->deactivate(); - } - /** * @see IdentityProvider_Driver::guest. */ -- cgit v1.2.3