mirror of
https://github.com/e107inc/e107.git
synced 2025-04-13 00:52:07 +02:00
Social fixes
This commit is contained in:
parent
f960364d7f
commit
1921e5ab93
@ -1494,7 +1494,7 @@ function init_session()
|
||||
|
||||
if($_SESSION['E:SOCIAL'] != FALSE)
|
||||
{
|
||||
$user = $_SESSION['E:SOCIAL'];
|
||||
$user = (array) $_SESSION['E:SOCIAL'];
|
||||
// print_a($_SESSION['E:SOCIAL']);
|
||||
define('USER', true);
|
||||
define('USERID', 1);
|
||||
|
@ -42,21 +42,21 @@ class signup_shortcodes extends e_shortcode
|
||||
|
||||
function sc_signup_xup() // show it to those who were using xup
|
||||
{
|
||||
return $this->sc_single_login();
|
||||
return $this->sc_social_login();
|
||||
}
|
||||
|
||||
|
||||
function sc_single_login()
|
||||
function sc_social_login()
|
||||
{
|
||||
$pref['single_login_active'] = 1;
|
||||
|
||||
if(vartrue($pref['single_login_active']))
|
||||
$pref = e107::getPref('social_login_active');
|
||||
|
||||
if(vartrue($pref))
|
||||
{
|
||||
$text = "";
|
||||
$providers = array('facebook','twitter','google','yahoo','blogger');
|
||||
foreach($providers as $p)
|
||||
{
|
||||
$text .= "<a href='".e_SELF."?provider={$p}'><img class='e-tip' title='Register using your {$p} account' src='".e_HANDLER."hybridauth/icons/{$p}.png' alt='' /></a>";
|
||||
$text .= "<a href='".e_BASE."index.php?provider={$p}'><img class='e-tip' title='Register using your {$p} account' src='".e_HANDLER."hybridauth/icons/{$p}.png' alt='' /></a>";
|
||||
}
|
||||
|
||||
$text .= "<hr />";
|
||||
|
@ -64,7 +64,7 @@
|
||||
|
||||
unset($_SESSION['E:SOCIAL']);
|
||||
|
||||
if(!isset($_SESSION['E:SOCIAL']) && e107::getPref('social_login_active', false) && (e_ADMIN_AREA !== true))
|
||||
if(vartrue($_GET['provider']) && !isset($_SESSION['E:SOCIAL']) && e107::getPref('social_login_active', false) && (e_ADMIN_AREA !== true))
|
||||
{
|
||||
require_once(e_HANDLER."hybridauth/Hybrid/Auth.php");
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
"providers" => e107::getPref('social_login', array())
|
||||
);
|
||||
|
||||
print_a($config);
|
||||
// print_a($config);
|
||||
// $params = array("hauth_return_to" => e_SELF);
|
||||
|
||||
$hybridauth = new Hybrid_Auth($config);
|
||||
|
Loading…
x
Reference in New Issue
Block a user