applications/dashboard/controllers/class.authenticationcontroller.php
public function Choose($AuthenticationSchemeAlias = NULL) {
      $this->Permission('Garden.Settings.Manage');
      $this->AddSideMenu('dashboard/authentication');
      $this->Title(T('Authentication'));
      $this->AddCssFile('authentication.css');
      
      $PreFocusAuthenticationScheme = NULL;
      if (!is_null($AuthenticationSchemeAlias))
         $PreFocusAuthenticationScheme = $AuthenticationSchemeAlias;
      
      if ($this->Form->AuthenticatedPostback()) {
         $NewAuthSchemeAlias = $this->Form->GetValue('Garden.Authentication.Chooser');
         $AuthenticatorInfo = Gdn::Authenticator()->GetAuthenticatorInfo($NewAuthSchemeAlias);
         if ($AuthenticatorInfo !== FALSE) {
            $CurrentAuthenticatorAlias = Gdn::Authenticator()->AuthenticateWith('default')->GetAuthenticationSchemeAlias();
            
            // Disable current
            $AuthenticatorDisableEvent = "DisableAuthenticator".ucfirst($CurrentAuthenticatorAlias);
            $this->FireEvent($AuthenticatorDisableEvent);
            
            // Enable new
            $AuthenticatorEnableEvent = "EnableAuthenticator".ucfirst($NewAuthSchemeAlias);
            $this->FireEvent($AuthenticatorEnableEvent);
            
            $PreFocusAuthenticationScheme = $NewAuthSchemeAlias;
            $this->CurrentAuthenticationAlias = Gdn::Authenticator()->AuthenticateWith('default')->GetAuthenticationSchemeAlias();
         }
      }
      
      $this->SetData('AuthenticationConfigureList', $this->ConfigureList);
      $this->SetData('PreFocusAuthenticationScheme', $PreFocusAuthenticationScheme);
      $this->Render();
   }
public function Choose($AuthenticationSchemeAlias = NULL) {
      $this->Permission('Garden.Settings.Manage');
      $this->AddSideMenu('dashboard/authentication');
      $this->Title(T('Authentication'));
      $this->AddCssFile('authentication.css');
      
      $PreFocusAuthenticationScheme = NULL;
      if (!is_null($AuthenticationSchemeAlias))
         $PreFocusAuthenticationScheme = $AuthenticationSchemeAlias;
      
      if ($this->Form->AuthenticatedPostback()) {
         $NewAuthSchemeAlias = $this->Form->GetValue('Garden.Authentication.Chooser');
         $AuthenticatorInfo = Gdn::Authenticator()->GetAuthenticatorInfo($NewAuthSchemeAlias);
         if ($AuthenticatorInfo !== FALSE) {
            $CurrentAuthenticatorAlias = Gdn::Authenticator()->AuthenticateWith('default')->GetAuthenticationSchemeAlias();
            
            // Disable current
            $AuthenticatorDisableEvent = "DisableAuthenticator".ucfirst($CurrentAuthenticatorAlias);
            $this->FireEvent($AuthenticatorDisableEvent);
            
            // Enable new
            $AuthenticatorEnableEvent = "EnableAuthenticator".ucfirst($NewAuthSchemeAlias);
            $this->FireEvent($AuthenticatorEnableEvent);
            
            $PreFocusAuthenticationScheme = $NewAuthSchemeAlias;
            $this->CurrentAuthenticationAlias = Gdn::Authenticator()->AuthenticateWith('default')->GetAuthenticationSchemeAlias();
         }
      }
      
      $this->SetData('AuthenticationConfigureList', $this->ConfigureList);
      $this->SetData('PreFocusAuthenticationScheme', $PreFocusAuthenticationScheme);
      $this->Render();
   }
public function Choose ( $ AuthenticationSchemeAlias = NULL ) { $ this -> Permission ( 'Garden.Settings.Manage' ) ; $ this -> AddSideMenu ( 'dashboard/authentication' ) ; $ this -> Title ( T ( 'Authentication' ) ) ; $ this -> AddCssFile ( 'authentication.css' ) ; $ PreFocusAuthenticationScheme = NULL ; if ( ! is_null ( $ AuthenticationSchemeAlias ) ) $ PreFocusAuthenticationScheme = $ AuthenticationSchemeAlias ; if ( $ this -> Form -> AuthenticatedPostback ( ) ) { $ NewAuthSchemeAlias = $ this -> Form -> GetValue ( 'Garden.Authentication.Chooser' ) ; $ AuthenticatorInfo = Gdn :: Authenticator ( ) -> GetAuthenticatorInfo ( $ NewAuthSchemeAlias ) ; if ( $ AuthenticatorInfo !== FALSE ) { $ CurrentAuthenticatorAlias = Gdn :: Authenticator ( ) -> AuthenticateWith ( 'default' ) -> GetAuthenticationSchemeAlias ( ) ; // Disable current $ AuthenticatorDisableEvent = "DisableAuthenticator" . ucfirst ( $ CurrentAuthenticatorAlias ) ; $ this -> FireEvent ( $ AuthenticatorDisableEvent ) ; // Enable new $ AuthenticatorEnableEvent = "EnableAuthenticator" . ucfirst ( $ NewAuthSchemeAlias ) ; $ this -> FireEvent ( $ AuthenticatorEnableEvent ) ; $ PreFocusAuthenticationScheme = $ NewAuthSchemeAlias ; $ this -> CurrentAuthenticationAlias = Gdn :: Authenticator ( ) -> AuthenticateWith ( 'default' ) -> GetAuthenticationSchemeAlias ( ) ; } } $ this -> SetData ( 'AuthenticationConfigureList' , $ this -> ConfigureList ) ; $ this -> SetData ( 'PreFocusAuthenticationScheme' , $ PreFocusAuthenticationScheme ) ; $ this -> Render ( ) ; }
Select Authentication method.

@since 2.0.3
@access public

@param string $AuthenticationSchemeAlias
Select Authentication method .