Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only add to global once

  • Loading branch information...
commit dbc72ca12f1767cab8f67f5ca809c1ed3ac08134 1 parent a11df65
@joehoyle joehoyle authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 hm-accounts/hm-accounts.sso.classes.php
View
8 hm-accounts/hm-accounts.sso.classes.php
@@ -117,7 +117,13 @@ function get_avatar( $size ) {
function __construct() {
global $hma_sso_providers;
- $hma_sso_providers[] = &$this;
+
+ if ( ! empty( $hma_sso_providers ) )
+ foreach ( $hma_sso_providers as $sso_provider )
+ $isset = $sso_provider->id == $this->id ? true : $isset;
+
+ if ( empty( $isset ) )
+ $hma_sso_providers[] = &$this;
add_action( 'hm_parse_request_^login/sso/authenticated/?$', array( &$this, '_check_sso_login_submitted' ) );
add_action( 'hm_parse_request_^profile/sso/authenticated/?$', array( &$this, '_check_sso_connect_with_account_submitted' ) );
Please sign in to comment.
Something went wrong with that request. Please try again.