mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +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:
@@ -194,9 +194,10 @@ class usersettings_shortcodes extends e_shortcode
|
|||||||
$options = array(
|
$options = array(
|
||||||
'size' => 40,
|
'size' => 40,
|
||||||
'title' => '',
|
'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.
|
if(!empty($sc->var['user_email']) && !empty($sc->var['user_xup'])) // social login active.
|
||||||
{
|
{
|
||||||
$options['readonly'] = true;
|
$options['readonly'] = true;
|
||||||
|
Reference in New Issue
Block a user