Commit 92ba7648 authored by David Monllaó's avatar David Monllaó Committed by Dan Poltawski
Browse files

Merge branch 'MDL-56905-master' of git://github.com/jleyva/moodle

parents 7afc76fb 5222cb1c
...@@ -63,8 +63,8 @@ $token = external_generate_token_for_current_user($service); ...@@ -63,8 +63,8 @@ $token = external_generate_token_for_current_user($service);
$privatetoken = $token->privatetoken; $privatetoken = $token->privatetoken;
external_log_token_request($token); external_log_token_request($token);
// Invalidate the private token if external_generate_token_for_current_user did not create a new token. // Don't return the private token if the user didn't just log in and a new token wasn't created.
if ($token->timecreated < $timenow) { if (empty($SESSION->justloggedin) and $token->timecreated < $timenow) {
$privatetoken = null; $privatetoken = null;
} }
......
Supports Markdown
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