mirror of
https://github.com/e107inc/e107.git
synced 2025-07-24 00:12:24 +02:00
Social fixes
This commit is contained in:
@@ -1494,7 +1494,7 @@ function init_session()
|
|||||||
|
|
||||||
if($_SESSION['E:SOCIAL'] != FALSE)
|
if($_SESSION['E:SOCIAL'] != FALSE)
|
||||||
{
|
{
|
||||||
$user = $_SESSION['E:SOCIAL'];
|
$user = (array) $_SESSION['E:SOCIAL'];
|
||||||
// print_a($_SESSION['E:SOCIAL']);
|
// print_a($_SESSION['E:SOCIAL']);
|
||||||
define('USER', true);
|
define('USER', true);
|
||||||
define('USERID', 1);
|
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
|
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;
|
$pref = e107::getPref('social_login_active');
|
||||||
|
|
||||||
if(vartrue($pref['single_login_active']))
|
if(vartrue($pref))
|
||||||
{
|
{
|
||||||
$text = "";
|
$text = "";
|
||||||
$providers = array('facebook','twitter','google','yahoo','blogger');
|
$providers = array('facebook','twitter','google','yahoo','blogger');
|
||||||
foreach($providers as $p)
|
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 />";
|
$text .= "<hr />";
|
||||||
|
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
unset($_SESSION['E:SOCIAL']);
|
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");
|
require_once(e_HANDLER."hybridauth/Hybrid/Auth.php");
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
"providers" => e107::getPref('social_login', array())
|
"providers" => e107::getPref('social_login', array())
|
||||||
);
|
);
|
||||||
|
|
||||||
print_a($config);
|
// print_a($config);
|
||||||
// $params = array("hauth_return_to" => e_SELF);
|
// $params = array("hauth_return_to" => e_SELF);
|
||||||
|
|
||||||
$hybridauth = new Hybrid_Auth($config);
|
$hybridauth = new Hybrid_Auth($config);
|
||||||
|
Reference in New Issue
Block a user