Commit f32800e0 authored by bbaetz%acm.org's avatar bbaetz%acm.org

Bug 205463 - Tokens aren't canceled after a successful login.

patch by 'Randall M! Gee', r=bbaetz, a=justdave
parent 1d057f02
......@@ -71,7 +71,7 @@ sub authenticate {
# Now we know that the user has logged in successfully,
# so delete any password tokens for them
require Token;
Token::DeletePasswordTokens("user logged in");
Token::DeletePasswordTokens($userid, "user_logged_in");
# The user may have had their account disabled
return (AUTH_DISABLED, $userid, $disabledtext)
......
......@@ -246,7 +246,7 @@ sub DeletePasswordTokens {
"WHERE userid=? AND tokentype='password'");
$sth->execute($userid);
while (my $token = $sth->fetchrow_array) {
Token::Cancel($token, "user_logged_in");
Token::Cancel($token, $reason);
}
}
......
......@@ -246,7 +246,7 @@ sub DeletePasswordTokens {
"WHERE userid=? AND tokentype='password'");
$sth->execute($userid);
while (my $token = $sth->fetchrow_array) {
Token::Cancel($token, "user_logged_in");
Token::Cancel($token, $reason);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment