summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Token.pm7
-rw-r--r--Token.pm7
2 files changed, 6 insertions, 8 deletions
diff --git a/Bugzilla/Token.pm b/Bugzilla/Token.pm
index 358a1bb22..78eef9335 100644
--- a/Bugzilla/Token.pm
+++ b/Bugzilla/Token.pm
@@ -257,10 +257,9 @@ sub HasEmailChangeToken {
my ($userid) = @_;
- &::SendSQL("SELECT token FROM tokens
- WHERE userid = $userid
- AND tokentype = 'emailnew'
- OR tokentype = 'emailold' LIMIT 1");
+ &::SendSQL("SELECT token FROM tokens WHERE userid = $userid " .
+ "AND (tokentype = 'emailnew' OR tokentype = 'emailold') " .
+ "LIMIT 1");
my ($token) = &::FetchSQLData();
return $token;
diff --git a/Token.pm b/Token.pm
index 358a1bb22..78eef9335 100644
--- a/Token.pm
+++ b/Token.pm
@@ -257,10 +257,9 @@ sub HasEmailChangeToken {
my ($userid) = @_;
- &::SendSQL("SELECT token FROM tokens
- WHERE userid = $userid
- AND tokentype = 'emailnew'
- OR tokentype = 'emailold' LIMIT 1");
+ &::SendSQL("SELECT token FROM tokens WHERE userid = $userid " .
+ "AND (tokentype = 'emailnew' OR tokentype = 'emailold') " .
+ "LIMIT 1");
my ($token) = &::FetchSQLData();
return $token;