summaryrefslogtreecommitdiffstats
path: root/Token.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Token.pm')
-rw-r--r--Token.pm7
1 files changed, 3 insertions, 4 deletions
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;