Changeset 2115
- Timestamp:
- Oct 2, 2007, 12:07:47 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_user.inc.php
r2084 r2115 25 25 // +-----------------------------------------------------------------------+ 26 26 27 // validate_mail_address verifies whether the given mail address has the 28 // right format. ie someone@domain.com "someone" can contain ".", "-" or 29 // even "_". Exactly as "domain". The extension doesn't have to be 30 // "com". The mail address can also be empty. 27 // validate_mail_address: 28 // o verifies whether the given mail address has the 29 // right format. ie someone@domain.com "someone" can contain ".", "-" or 30 // even "_". Exactly as "domain". The extension doesn't have to be 31 // "com". The mail address can also be empty. 32 // o check if address could be empty 33 // o check if address is not used by a other user 31 34 // If the mail address doesn't correspond, an error message is returned. 32 function validate_mail_address( $mail_address ) 33 { 34 global $lang, $conf; 35 // 36 function validate_mail_address($mail_address) 37 { 38 global $conf; 35 39 36 40 if (empty($mail_address) and … … 39 43 return ''; 40 44 } 45 41 46 $regex = '/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)*\.[a-z]+$/'; 42 47 if ( !preg_match( $regex, $mail_address ) ) 43 48 { 44 return $lang['reg_err_mail_address']; 49 return l10n('reg_err_mail_address'); 50 } 51 52 if (defined("PHPWG_INSTALLED") and !empty($mail_address)) 53 { 54 $query = ' 55 select count(*) 56 from '.USERS_TABLE.' 57 where upper('.$conf['user_fields']['email'].') = upper(\''.$mail_address.'\') 58 ;'; 59 list($count) = mysql_fetch_array(pwg_query($query)); 60 if ($count != 0) 61 { 62 return l10n('reg_err_mail_address_dbl'); 63 } 45 64 } 46 65 } … … 48 67 function register_user($login, $password, $mail_address, $errors = array()) 49 68 { 50 global $ lang, $conf;69 global $conf; 51 70 52 71 if ($login == '') 53 72 { 54 array_push($errors, $lang['reg_err_login1']);73 array_push($errors, l10n('reg_err_login1')); 55 74 } 56 75 if (ereg("^.* $", $login)) 57 76 { 58 array_push($errors, $lang['reg_err_login2']);77 array_push($errors, l10n('reg_err_login2')); 59 78 } 60 79 if (ereg("^ .*$", $login)) 61 80 { 62 array_push($errors, $lang['reg_err_login3']);81 array_push($errors, l10n('reg_err_login3')); 63 82 } 64 83 if (get_userid($login)) 65 84 { 66 array_push($errors, $lang['reg_err_login5']);85 array_push($errors, l10n('reg_err_login5')); 67 86 } 68 87 $mail_error = validate_mail_address($mail_address); -
trunk/language/en_UK.iso-8859-1/common.lang.php
r2114 r2115 638 638 // --------- Starting below: New or revised $lang ---- from Butterfly (1.8) 639 639 $lang['Administrator, webmaster and special user cannot use this method'] = 'Administrator, webmaster and special user cannot use this method'; 640 $lang['reg_err_mail_address_dbl'] = 'a user use already this mail address'; 640 641 ?> -
trunk/language/en_UK.iso-8859-1/install.lang.php
r1900 r2115 5 5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 // | branch : BSF (Best So Far) 8 // | file : $RCSfile$ 7 // | file : $Id$ 9 8 // | last update : $Date$ 10 9 // | last modifier : $Author$ … … 33 32 $lang['Start_Install'] = 'Start Install'; 34 33 $lang['reg_err_mail_address'] = 'mail address must be like xxx@yyy.eee (example : jack@altern.org)'; 35 $lang['mail_webmaster'] = 'Webmaster mail adress';36 $lang['mail_webmaster_info'] = 'Visitors will be able to contact site administrator with this mail';37 $lang['reg_err_mail_address'] = 'e-mail address refused, it must be like name@server.com';38 34 39 35 $lang['install_webmaster'] = 'Webmaster login'; … … 73 69 <li>this login will enable you to access to the administration panel and to the instructions in order to place pictures in your directories</li> 74 70 </ul>'; 75 $lang['conf_mail_webmaster'] = 'Webmaster mail ad ress';71 $lang['conf_mail_webmaster'] = 'Webmaster mail address'; 76 72 $lang['conf_mail_webmaster_info'] = 'Visitors will be able to contact site administrator with this mail'; 77 73 ?> -
trunk/language/fr_FR.iso-8859-1/common.lang.php
r2055 r2115 637 637 // --------- Starting below: New or revised $lang ---- from Butterfly (1.8) 638 638 $lang['Administrator, webmaster and special user cannot use this method'] = 'Administrateur, webmestre et utilisateur spécial ne peuvent pas utiliser cette méthode'; 639 $lang['reg_err_mail_address_dbl'] = 'un utilisateur utilise déjà cette adresse e-mail'; 639 640 ?> -
trunk/language/fr_FR.iso-8859-1/install.lang.php
r1900 r2115 5 5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 // | branch : BSF (Best So Far) 8 // | file : $RCSfile$ 7 // | file : $Id$ 9 8 // | last update : $Date$ 10 9 // | last modifier : $Author$ -
trunk/plugins/c13y_upgrade/initialize.inc.php
r2104 r2115 40 40 $result = array(); 41 41 42 /* Check user with same e-mail */ 43 $query = ' 44 select count(*) 45 from '.USERS_TABLE.' 46 group by upper('.$conf['user_fields']['email'].') 47 having count(*) > 1 48 limit 0,1 49 ;'; 50 51 if (mysql_fetch_array(pwg_query($query))) 52 { 53 $result[] = get_c13y( 54 l10n('c13y_exif_dbl_email_user'), 55 null, 56 null, 57 l10n('c13y_exif_correction_dbl_email_user')); 58 } 59 60 61 /* Check if this plugin must deactivate */ 42 62 if (count($result) === 0) 43 63 { -
trunk/plugins/c13y_upgrade/language/en_UK.iso-8859-1/plugin.lang.php
r2104 r2115 28 28 $lang['c13y_upgrade_no_anomaly'] = 'No anomaly detected after application upgrade'; 29 29 $lang['c13y_upgrade_deactivate'] = 'You can deactivate "Check upgrades" plugin'; 30 30 $lang['c13y_exif_dbl_email_user'] = 'Users with same email address'; 31 $lang['c13y_exif_correction_dbl_email_user'] = 'Delete duplicate users'; 31 32 ?> -
trunk/plugins/c13y_upgrade/language/fr_FR.iso-8859-1/plugin.lang.php
r2104 r2115 28 28 $lang['c13y_upgrade_no_anomaly'] = 'Pas d\'anomalie détectée après la mise à jour de l\'application'; 29 29 $lang['c13y_upgrade_deactivate'] = 'Vous pouvez désactiver le plugin "Check upgrades"'; 30 $lang['c13y_exif_dbl_email_user'] = 'Utilisateurs avec la même adresse email'; 31 $lang['c13y_exif_correction_dbl_email_user'] = 'Supprimez les utilisateurs en double'; 30 32 31 33 ?>
Note: See TracChangeset
for help on using the changeset viewer.