本文整理汇总了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');
}
}