From 2c733cd3f12e193077c47ad1380455f7c8ac6a67 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Fri, 22 May 2020 17:26:36 -0500 Subject: [PATCH] {EMAIL} shortcode: Client-side required based on disable_emailcheck The `disable_emailcheck` pref now decides whether the email field in the {EMAIL} shortcode will be required. See: https://github.com/e107inc/e107/issues/4115#issuecomment-609147815 --- e107_core/shortcodes/batch/usersettings_shortcodes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e107_core/shortcodes/batch/usersettings_shortcodes.php b/e107_core/shortcodes/batch/usersettings_shortcodes.php index 8443a37ed..d8d34fb6a 100755 --- a/e107_core/shortcodes/batch/usersettings_shortcodes.php +++ b/e107_core/shortcodes/batch/usersettings_shortcodes.php @@ -194,9 +194,10 @@ class usersettings_shortcodes extends e_shortcode $options = array( 'size' => 40, 'title' => '', - 'required' => true, ); + if (e107::getPref('disable_emailcheck') == 0) $options['required'] = true; + if(!empty($sc->var['user_email']) && !empty($sc->var['user_xup'])) // social login active. { $options['readonly'] = true;