diff options
author | rub <rub@piwigo.org> | 2007-10-01 22:07:47 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-10-01 22:07:47 +0000 |
commit | f7196c793a77f7a89713d10a31fd130e7604a4fb (patch) | |
tree | 752ddc42a577d2586673735e1461c5c4acb9ffce /plugins/c13y_upgrade/initialize.inc.php | |
parent | f8e8bdf05bee2444f003bc5dbb001343e1459e73 (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/c13y_upgrade/initialize.inc.php')
-rw-r--r-- | plugins/c13y_upgrade/initialize.inc.php | 20 |
1 files changed, 20 insertions, 0 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 =
|