diff --git a/e107_core/shortcodes/batch/signup_shortcodes.php b/e107_core/shortcodes/batch/signup_shortcodes.php index 8a8a0e5aa..9e2012efc 100755 --- a/e107_core/shortcodes/batch/signup_shortcodes.php +++ b/e107_core/shortcodes/batch/signup_shortcodes.php @@ -40,17 +40,27 @@ class signup_shortcodes extends e_shortcode } } - function sc_signup_xup() // show it to those who were using xup + function sc_signup_xup($param) // show it to those who were using xup { - return $this->sc_signup_social_login(); + switch ($param) + { + case 'login': + return $this->sc_signup_social_login(); + break; + + case 'signup': + default: + return $this->sc_signup_xup_signup(); + break; + } } - - function sc_signup_social_login() + // TODO - template + function sc_signup_xup_login() { $pref = e107::getPref('social_login_active'); - if(vartrue($pref)) + if(!empty($pref)) { $text = ""; $providers = e107::getPref('social_login'); @@ -60,7 +70,32 @@ class signup_shortcodes extends e_shortcode $p = strtolower($p); if($v['enabled'] == 1) { - $text .= ""; + $text .= ""; + } + //TODO different icon options. see: http://zocial.smcllns.com/ + } + + // $text .= "
"; + return $text; + } + } + + // TODO - template + function sc_signup_xup_signup() + { + $pref = e107::getPref('social_login_active'); + + if(!empty($pref)) + { + $text = ""; + $providers = e107::getPref('social_login'); + + foreach($providers as $p=>$v) + { + $p = strtolower($p); + if($v['enabled'] == 1) + { + $text .= ""; } //TODO different icon options. see: http://zocial.smcllns.com/ } diff --git a/e107_handlers/user_handler.php b/e107_handlers/user_handler.php index 6dac38337..cafd5d4dd 100644 --- a/e107_handlers/user_handler.php +++ b/e107_handlers/user_handler.php @@ -954,8 +954,8 @@ class e_user_provider $userdata['user_login'] = $userdata['user_name']; $userdata['user_customtitle'] = ''; // not used $userdata['user_password'] = $userMethods->HashPassword($plainPwd, $userdata['user_loginname']); // pwd - $userdata['user_sess'] = $profile->photoURL; // should we? - $userdata['user_image'] = ''; // not used + $userdata['user_sess'] = ''; // + $userdata['user_image'] = $profile->photoURL; // avatar $userdata['user_signature'] = ''; // not used $userdata['user_hideemail'] = 1; // hide it by default $userdata['user_xup'] = $sql->escape($this->userId());