projects
/
fusionforge
/
fusionforge.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
project home
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2ad1b1c
)
Fixed checking of email unicity when changing email addresses, patch by Julien Heyman
author
Roland Mas
<lolando@debian.org>
Wed, 3 Jun 2009 08:40:11 +0000
(08:40 +0000)
committer
Roland Mas
<lolando@debian.org>
Wed, 3 Jun 2009 08:40:11 +0000
(08:40 +0000)
gforge/common/include/User.class.php
patch
|
blob
|
history
diff --git
a/gforge/common/include/User.class.php
b/gforge/common/include/User.class.php
index a021205afd699c92775aa61a3eabdaa35eb7284c..a164f75fb722b09887944c07e7f835c1b6c2a26b 100644
(file)
--- a/
gforge/common/include/User.class.php
+++ b/
gforge/common/include/User.class.php
@@
-834,8
+834,8
@@
Enjoy the site.
}
if ($GLOBALS['sys_require_unique_email']) {
}
if ($GLOBALS['sys_require_unique_email']) {
- if (db_numrows(db_query_params('SELECT user_id FROM users WHERE
email ILIKE $1 OR email_new ILIKE $2
',
- array ($
email
, $email))) > 0) {
+ if (db_numrows(db_query_params('SELECT user_id FROM users WHERE
user_id!=$1 AND (email ILIKE $2 OR email_new ILIKE $2)
',
+ array ($
this->getID()
, $email))) > 0) {
$this->setError(_('User with this email already exists.'));
return false;
}
$this->setError(_('User with this email already exists.'));
return false;
}
@@
-886,8
+886,8
@@
Enjoy the site.
}
if ($GLOBALS['sys_require_unique_email']) {
}
if ($GLOBALS['sys_require_unique_email']) {
- if (db_numrows(db_query_params
('SELECT user_id FROM users WHERE email ILIKE $1 OR email_new ILIKE $1
',
-
array (
$email))) > 0) {
+ if (db_numrows(db_query_params
('SELECT user_id FROM users WHERE user_id!=$1 AND (email ILIKE $2 OR email_new ILIKE $2)
',
+
array ($this->getID(),
$email))) > 0) {
$this->setError(_('User with this email already exists.'));
return false;
}
$this->setError(_('User with this email already exists.'));
return false;
}