summaryrefslogtreecommitdiffstats
path: root/userprefs.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-xuserprefs.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/userprefs.cgi b/userprefs.cgi
index 193a4d73f..a1239ca8f 100755
--- a/userprefs.cgi
+++ b/userprefs.cgi
@@ -49,6 +49,7 @@ my @reasons = ("Removeme", "Comments", "Attachments", "Status", "Resolved",
# SaveFoo may be called before DoFoo.
###############################################################################
sub DoAccount {
+ my $dbh = Bugzilla->dbh;
SendSQL("SELECT realname FROM profiles WHERE userid = $userid");
$vars->{'realname'} = FetchSQLData();
@@ -57,7 +58,7 @@ sub DoAccount {
FROM tokens
WHERE userid = $userid
AND tokentype LIKE 'email%'
- ORDER BY tokentype ASC LIMIT 1");
+ ORDER BY tokentype ASC " . $dbh->sql_limit(1));
if(MoreSQLData()) {
my ($tokentype, $change_date, $eventdata) = &::FetchSQLData();
$vars->{'login_change_date'} = $change_date;