1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

{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
This commit is contained in:
Nick Liu
2020-05-22 17:26:36 -05:00
parent 27dd9ab287
commit 2c733cd3f1

View File

@@ -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;