From f7196c793a77f7a89713d10a31fd130e7604a4fb Mon Sep 17 00:00:00 2001 From: rub Date: Mon, 1 Oct 2007 22:07:47 +0000 Subject: Resolved 0000759: email unique for each user git-svn-id: http://piwigo.org/svn/trunk@2115 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/c13y_upgrade/initialize.inc.php | 20 ++++++++++++++++++++ .../language/en_UK.iso-8859-1/plugin.lang.php | 3 ++- .../language/fr_FR.iso-8859-1/plugin.lang.php | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) (limited to 'plugins/c13y_upgrade') diff --git a/plugins/c13y_upgrade/initialize.inc.php b/plugins/c13y_upgrade/initialize.inc.php index 996b80f4a..aa8428b31 100644 --- a/plugins/c13y_upgrade/initialize.inc.php +++ b/plugins/c13y_upgrade/initialize.inc.php @@ -39,6 +39,26 @@ function c13y_upgrade($c13y_array) $result = array(); + /* Check user with same e-mail */ + $query = ' +select count(*) +from '.USERS_TABLE.' +group by upper('.$conf['user_fields']['email'].') +having count(*) > 1 +limit 0,1 +;'; + + if (mysql_fetch_array(pwg_query($query))) + { + $result[] = get_c13y( + l10n('c13y_exif_dbl_email_user'), + null, + null, + l10n('c13y_exif_correction_dbl_email_user')); + } + + + /* Check if this plugin must deactivate */ if (count($result) === 0) { $deactivate_msg_link = diff --git a/plugins/c13y_upgrade/language/en_UK.iso-8859-1/plugin.lang.php b/plugins/c13y_upgrade/language/en_UK.iso-8859-1/plugin.lang.php index a77b6d259..d8db86284 100644 --- a/plugins/c13y_upgrade/language/en_UK.iso-8859-1/plugin.lang.php +++ b/plugins/c13y_upgrade/language/en_UK.iso-8859-1/plugin.lang.php @@ -27,5 +27,6 @@ // --------- Starting below: New or revised $lang ---- from Butterfly (1.8) $lang['c13y_upgrade_no_anomaly'] = 'No anomaly detected after application upgrade'; $lang['c13y_upgrade_deactivate'] = 'You can deactivate "Check upgrades" plugin'; - +$lang['c13y_exif_dbl_email_user'] = 'Users with same email address'; +$lang['c13y_exif_correction_dbl_email_user'] = 'Delete duplicate users'; ?> diff --git a/plugins/c13y_upgrade/language/fr_FR.iso-8859-1/plugin.lang.php b/plugins/c13y_upgrade/language/fr_FR.iso-8859-1/plugin.lang.php index aea3e9351..454168e2c 100644 --- a/plugins/c13y_upgrade/language/fr_FR.iso-8859-1/plugin.lang.php +++ b/plugins/c13y_upgrade/language/fr_FR.iso-8859-1/plugin.lang.php @@ -27,5 +27,7 @@ // --------- Starting below: New or revised $lang ---- from Butterfly (1.8) $lang['c13y_upgrade_no_anomaly'] = 'Pas d\'anomalie détectée après la mise à jour de l\'application'; $lang['c13y_upgrade_deactivate'] = 'Vous pouvez désactiver le plugin "Check upgrades"'; +$lang['c13y_exif_dbl_email_user'] = 'Utilisateurs avec la même adresse email'; +$lang['c13y_exif_correction_dbl_email_user'] = 'Supprimez les utilisateurs en double'; ?> -- cgit v1.2.3