diff options
-rw-r--r-- | Bugzilla/Token.pm | 7 | ||||
-rw-r--r-- | Token.pm | 7 |
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; @@ -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; |