Skip to content

Commit 337473b

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents ec64cf5 + 6cc90d3 commit 337473b

File tree

4 files changed

+13
-23
lines changed

4 files changed

+13
-23
lines changed

interface/web/client/form/client.tform.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,7 @@
329329
'type' => 'TOLOWER')
330330
),
331331
'validators' => array (
332-
0 => array ( 'type' => 'REGEX',
333-
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i',
334-
'errmsg'=> 'email_error_isemail'),
332+
0 => array ( 'type' => 'ISEMAIL', 'errmsg'=> 'email_error_isemail'),
335333
1 => array ( 'type' => 'NOTEMPTY',
336334
'errmsg'=> 'email_error_empty'),
337335
),
@@ -502,9 +500,8 @@
502500
2 => array( 'event' => 'SAVE',
503501
'type' => 'TOLOWER')
504502
),
505-
'validators' => array ( 0 => array ( 'type' => 'REGEX',
506-
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i',
507-
'errmsg'=> 'paypal_email_error_isemail'),
503+
'validators' => array (
504+
0 => array ( 'type' => 'ISEMAIL', 'errmsg'=> 'email_error_isemail'),
508505
),
509506
'default' => '',
510507
'value' => '',

interface/web/client/form/reseller.tform.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,8 @@
328328
2 => array( 'event' => 'SAVE','type' => 'TOLOWER')
329329
),
330330
'validators' => array (
331-
0 => array ( 'type' => 'REGEX',
332-
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i',
333-
'errmsg'=> 'email_error_isemail'),
334-
1 => array ( 'type' => 'NOTEMPTY',
335-
'errmsg'=> 'email_error_empty'),
336-
),
337-
'validators' => array ( 0 => array ( 'type' => 'REGEX',
338-
'regex' => '/^\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-zA-Z0-9\-]{2,30}$/i',
339-
'errmsg'=> 'email_error_isemail'),
331+
0 => array ( 'type' => 'ISEMAIL', 'errmsg'=> 'email_error_isemail'),
332+
1 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'email_error_empty'),
340333
),
341334
'default' => '',
342335
'value' => '',
@@ -505,9 +498,8 @@
505498
2 => array( 'event' => 'SAVE',
506499
'type' => 'TOLOWER')
507500
),
508-
'validators' => array ( 0 => array ( 'type' => 'REGEX',
509-
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i',
510-
'errmsg'=> 'paypal_email_error_isemail'),
501+
'validators' => array (
502+
0 => array ( 'type' => 'ISEMAIL', 'errmsg'=> 'paypal_email_error_isemail'),
511503
),
512504
'default' => '',
513505
'value' => '',

interface/web/mailuser/form/mail_user_cc.tform.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,8 @@
6868
2 => array( 'event' => 'SAVE',
6969
'type' => 'TOLOWER')
7070
),
71-
'validators' => array ( 0 => array ( 'type' => 'REGEX',
72-
//'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}){0,1}$/i',
73-
'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}(,\s*\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,}$/i',
74-
'errmsg'=> 'cc_error_isemail'),
71+
'validators' => array (
72+
0 => array ( 'type' => 'ISEMAIL', 'errmsg'=> 'cc_error_isemail'),
7573
),
7674
'default' => '',
7775
'value' => '',

server/plugins-available/mail_plugin.inc.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ function user_insert($event_name, $data) {
206206
}
207207

208208
//* Send the welcome email message
209-
if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) {
209+
$domain = explode('@', $data["new"]["email"])[1];
210+
if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt')) {
211+
$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.txt');
212+
} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) {
210213
$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt');
211214
} elseif(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_en.txt')) {
212215
$lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_en.txt');

0 commit comments

Comments
 (0)