aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/c13y_upgrade
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/c13y_upgrade')
-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';
?>