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:
024ebd6
)
admin shoudn't set two time the same email
author
Alain Peyrat
<aljeux@free.fr>
Thu, 26 Feb 2009 19:41:18 +0000
(19:41 +0000)
committer
Alain Peyrat
<aljeux@free.fr>
Thu, 26 Feb 2009 19:41:18 +0000
(19:41 +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 5a0c257a71cdf76efeba7742801c3080a74a79f6..2ee3c995e68cbdbdcb10d885e719552d63128470 100644
(file)
--- a/
gforge/common/include/User.class.php
+++ b/
gforge/common/include/User.class.php
@@
-747,6
+747,14
@@
Enjoy the site.
$this->setError('ERROR: Invalid Email');
return false;
}
+
+ if ($GLOBALS['sys_require_unique_email']) {
+ if (db_numrows(db_query("SELECT user_id FROM users WHERE email ILIKE '$email' OR email_new ILIKE '$email'")) > 0) {
+ $this->setError(_('User with this email already exists.'));
+ return false;
+ }
+ }
+
db_begin();
$res=db_query("
UPDATE users