diff --git a/e107_core/shortcodes/batch/usersettings_shortcodes.php b/e107_core/shortcodes/batch/usersettings_shortcodes.php index b9994fee0..79336db30 100755 --- a/e107_core/shortcodes/batch/usersettings_shortcodes.php +++ b/e107_core/shortcodes/batch/usersettings_shortcodes.php @@ -81,16 +81,40 @@ class usersettings_shortcodes extends e_shortcode function sc_customtitle($parm) { - if (e107::getPref('signup_option_customtitle')) + $pref = e107::getPref(); + if ($pref['signup_option_customtitle']) { - $options = array('title'=> '', 'size' => 40); + $options = array( + 'title'=> '', + 'size' => 40, + 'required' => ($pref['signup_option_customtitle'] == 2)); return e107::getForm()->text('customtitle', $this->var['user_customtitle'], 100, $options); } } - - + function sc_realname($parm) + { + $pref = e107::getPref(); + if ($pref['signup_option_realname']) + { + $sc = e107::getScBatch('usersettings'); + $options = array( + 'title' => '', + 'size' => 40, + 'required' => ($pref['signup_option_realname'] == 2), + ); + if(!empty($sc->var['user_login']) && !empty($sc->var['user_xup'])) // social login active. + { + $options['readonly'] = true; + } + + return e107::getForm()->text('realname', $sc->var['user_login'], 100, $options); + } + } + +/* + function sc_realname2($parm) { $pref = e107::getPref(); $sc = e107::getScBatch('usersettings'); @@ -108,7 +132,7 @@ class usersettings_shortcodes extends e_shortcode return e107::getForm()->text('realname', $sc->var['user_login'], 100, $options); } - +*/ function sc_password1($parm) diff --git a/e107_core/templates/usersettings_template.php b/e107_core/templates/usersettings_template.php index 330f0ca4d..e96c6afec 100755 --- a/e107_core/templates/usersettings_template.php +++ b/e107_core/templates/usersettings_template.php @@ -46,7 +46,7 @@ $sc_style['PASSWORD_LEN']['pre'] = "
(".LAN_USE $sc_style['PASSWORD_LEN']['post'] = " ".LAN_USER_79.")"; $sc_style['USERCLASSES']['pre'] = " - ".LAN_USER_76.":".req(varset($pref['signup_option_class']))." + ".LAN_USER_76.":".req(varset(e107::getPref('signup_option_class')))."
".LAN_USER_73." "; @@ -77,7 +77,7 @@ $sc_style['LOGINNAME']['pre'] = " $sc_style['LOGINNAME']['post'] = "\n"; -$sc_style['SIGNATURE']['pre'] = "".LAN_USER_71.req(varset($pref['signup_option_signature']))." +$sc_style['SIGNATURE']['pre'] = "".LAN_USER_71.req(varset(e107::getPref('signup_option_signature')))." "; //$sc_style['SIGNATURE']['pre'] = " @@ -125,18 +125,13 @@ $USERSETTINGS_EDIT = " {LOGINNAME} - ".LAN_USER_60.req(!varset($pref['disable_emailcheck']))." + ".LAN_USER_60.req(!varset(e107::getPref('disable_emailcheck')))." {EMAIL} - - ".LAN_USER_63.req(varset($pref['signup_option_realname']))." - {REALNAME} - - {CUSTOMTITLE} @@ -154,7 +149,7 @@ $USERSETTINGS_EDIT = " - ".LAN_USER_07.req(varset($pref['signup_option_image']))." + ".LAN_USER_07.req(varset(e107::getPref('signup_option_image')))." {AVATAR_REMOTE} @@ -208,14 +203,20 @@ $USERSETTINGS_WRAPPER['edit']['PASSWORD2'] = "
"; +$USERSETTINGS_WRAPPER['edit']['REALNAME'] = "
+ +
{---}
+
+ "; + $USERSETTINGS_WRAPPER['edit']['CUSTOMTITLE'] = "
- +
{---}
"; $USERSETTINGS_WRAPPER['edit']['USERCLASSES'] = "
- +
{---}
"; @@ -234,7 +235,7 @@ $USERSETTINGS_WRAPPER['edit']['PHOTO_UPLOAD'] = "
$USERSETTINGS_WRAPPER['edit']['SIGNATURE'] = "
- +
{---}
"; @@ -257,18 +258,13 @@ $USERSETTINGS_TEMPLATE['edit'] = "
- +
{EMAIL}
-
- -
- {REALNAME} -
-
+ {REALNAME} {CUSTOMTITLE} @@ -285,7 +281,7 @@ $USERSETTINGS_TEMPLATE['edit'] = "
- +
{AVATAR_REMOTE}