【发布时间】:2013-11-25 14:29:18
【问题描述】:
我正在使用 hybridauth 来允许我的用户登录我的网站。 我想知道当前用户正在使用哪个身份验证提供商(facebook、googel、..)。 在这种情况下,我使用下面的脚本。但它没有获得身份验证提供程序。 这个怎么做。给我一些提示?
<?php
session_start();
$config = dirname(__FILE__) . '/hybridauth/config.php';
require_once('hybridauth/Hybrid/Auth.php');
$ha = new Hybrid_Auth($config);
$t = $ha->authenticate('Facebook');
if ($t->isUserConnected()) {
$profile = $t->getUserProfile();
?>
<html>
<body>
<pre><?php echo print_r ($profile); }?></pre>
</body>
</html>
【问题讨论】:
标签: php hybridauth hybridauthprovider