Changeset 18164 for trunk/include/functions_user.inc.php
- Timestamp:
- Sep 23, 2012, 11:34:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_user.inc.php
r13240 r18164 42 42 } 43 43 44 $atom = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]'; // before arobase 45 $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name 46 $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i'; 47 48 if ( !preg_match( $regex, $mail_address ) ) 44 if ( !email_check_format($mail_address) ) 49 45 { 50 46 return l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'); … … 54 50 { 55 51 $query = ' 56 selectcount(*)57 from'.USERS_TABLE.'58 whereupper('.$conf['user_fields']['email'].') = upper(\''.$mail_address.'\')59 '.(is_numeric($user_id) ? ' and'.$conf['user_fields']['id'].' != \''.$user_id.'\'' : '').'52 SELECT count(*) 53 FROM '.USERS_TABLE.' 54 WHERE upper('.$conf['user_fields']['email'].') = upper(\''.$mail_address.'\') 55 '.(is_numeric($user_id) ? 'AND '.$conf['user_fields']['id'].' != \''.$user_id.'\'' : '').' 60 56 ;'; 61 57 list($count) = pwg_db_fetch_row(pwg_query($query));
Note: See TracChangeset
for help on using the changeset viewer.