Changeset 2124 for trunk/include/functions_user.inc.php
- Timestamp:
- Oct 6, 2007, 8:41:18 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_user.inc.php
r2115 r2124 34 34 // If the mail address doesn't correspond, an error message is returned. 35 35 // 36 function validate_mail_address($ mail_address)36 function validate_mail_address($user_id, $mail_address) 37 37 { 38 38 global $conf; 39 39 40 40 if (empty($mail_address) and 41 !($conf['obligatory_user_mail_address'] and in_array(script_basename(), array('register', 'profile')))) 41 !($conf['obligatory_user_mail_address'] and 42 in_array(script_basename(), array('register', 'profile')))) 42 43 { 43 44 return ''; … … 56 57 from '.USERS_TABLE.' 57 58 where upper('.$conf['user_fields']['email'].') = upper(\''.$mail_address.'\') 59 '.(is_numeric($user_id) ? 'and '.$conf['user_fields']['id'].' != \''.$user_id.'\'' : '').' 58 60 ;'; 59 61 list($count) = mysql_fetch_array(pwg_query($query)); … … 85 87 array_push($errors, l10n('reg_err_login5')); 86 88 } 87 $mail_error = validate_mail_address( $mail_address);89 $mail_error = validate_mail_address(null, $mail_address); 88 90 if ('' != $mail_error) 89 91 {
Note: See TracChangeset
for help on using the changeset viewer.