diff --git a/Bugzilla/Token.pm b/Bugzilla/Token.pm index 358a1bb229e712456511d9cc5330cdfc9678cf54..78eef9335fda94666444a6193d5d2cda275f1f8f 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 358a1bb229e712456511d9cc5330cdfc9678cf54..78eef9335fda94666444a6193d5d2cda275f1f8f 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;