1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-24 15:13:04 +02:00

XUP (Social Login) fixes in usersettings form. Banner menu query corrected.

This commit is contained in:
Cameron
2016-03-14 03:03:56 -07:00
parent fa8f25dfc5
commit 238c7b0bac
2 changed files with 42 additions and 3 deletions

View File

@@ -80,6 +80,12 @@ class usersettings_shortcodes extends e_shortcode
function sc_realname($parm)
{
if(!empty($this->var['user_xup'])) // social login active.
{
return $this->var['user_login'];
}
$pref = e107::getPref();
$options = array('title'=> '', 'size' => 40,'required'=>$pref['signup_option_realname']);
return e107::getForm()->text('realname',$this->var['user_login'], 100, $options);
@@ -90,6 +96,11 @@ class usersettings_shortcodes extends e_shortcode
function sc_password1($parm)
{
$pref = e107::getPref();
if(!empty($this->var['user_xup'])) // social login active.
{
return null;
}
if(!isset($pref['auth_method']) || $pref['auth_method'] == '' || $pref['auth_method'] == 'e107' || $pref['auth_method'] == '>e107')
{
@@ -105,6 +116,11 @@ class usersettings_shortcodes extends e_shortcode
function sc_password2($parm)
{
$pref = e107::getPref();
if(!empty($this->var['user_xup'])) // social login active.
{
return null;
}
if(!isset($pref['auth_method']) || $pref['auth_method'] == '' || $pref['auth_method'] == 'e107' || $pref['auth_method'] == '>e107')
{
@@ -130,7 +146,12 @@ class usersettings_shortcodes extends e_shortcode
function sc_email($parm)
{
{
if(!empty($this->var['user_xup'])) // social login active.
{
return $this->var['user_email'];
}
$options = array('size' => 40,'title'=>'','required'=>true);
return e107::getForm()->email('email', $this->var['user_email'], 100, $options);
}
@@ -227,6 +248,12 @@ class usersettings_shortcodes extends e_shortcode
function sc_avatar_remote($parm)
{
if(!empty($this->var['user_xup'])) // social login active.
{
// return $this->var['user_image'];
return e107::getParser()->toAvatar($this->var);
}
return e107::getForm()->avatarpicker('image',$this->var['user_image'],array('upload'=>1));
}