本文整理匯總了PHP中Gdn_AuthenticationProviderModel::GetProviders方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gdn_AuthenticationProviderModel::GetProviders方法的具體用法?PHP Gdn_AuthenticationProviderModel::GetProviders怎麽用?PHP Gdn_AuthenticationProviderModel::GetProviders使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Gdn_AuthenticationProviderModel
的用法示例。
在下文中一共展示了Gdn_AuthenticationProviderModel::GetProviders方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Disconnect
public function Disconnect($UserReference = '', $Username = '', $Provider)
{
if (!$this->Request->IsPostBack()) {
throw PermissionException('Javascript');
}
$this->Permission('Garden.SignIn.Allow');
$this->GetUserInfo($UserReference, $Username, '', TRUE);
// First try and delete the authentication the fast way.
Gdn::SQL()->Delete('UserAuthentication', array('UserID' => $this->User->UserID, 'ProviderKey' => $Provider));
// Delete the profile information.
Gdn::UserModel()->SaveAttribute($this->User->UserID, $Provider, NULL);
if ($this->DeliveryType() == DELIVERY_TYPE_ALL) {
Redirect(UserUrl($this->User), '', 'connections');
} else {
// Grab all of the providers again.
$PModel = new Gdn_AuthenticationProviderModel();
$Providers = $PModel->GetProviders();
$this->SetData('_Providers', $Providers);
$this->SetData('Connections', array());
$this->FireEvent('GetConnections');
// Send back the connection button.
$Connection = $this->Data("Connections.{$Provider}");
require_once $this->FetchViewLocation('connection_functions');
$this->JsonTarget("#Provider_{$Provider} .ActivateSlider", ConnectButton($Connection), 'ReplaceWith');
$this->Render('Blank', 'Utility', 'Dashboard');
}
}