aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-10-01 22:07:47 +0000
committerrub <rub@piwigo.org>2007-10-01 22:07:47 +0000
commitf7196c793a77f7a89713d10a31fd130e7604a4fb (patch)
tree752ddc42a577d2586673735e1461c5c4acb9ffce /plugins
parentf8e8bdf05bee2444f003bc5dbb001343e1459e73 (diff)
Resolved 0000759: email unique for each user
git-svn-id: http://piwigo.org/svn/trunk@2115 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins')
-rw-r--r--plugins/c13y_upgrade/initialize.inc.php20
-rw-r--r--plugins/c13y_upgrade/language/en_UK.iso-8859-1/plugin.lang.php3
-rw-r--r--plugins/c13y_upgrade/language/fr_FR.iso-8859-1/plugin.lang.php2
3 files changed, 24 insertions, 1 deletions
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';
?>