Commit 5222cb1c authored by Juan Leyva's avatar Juan Leyva
Browse files

MDL-56905 tool_mobile: Return private tokens just after log-in

parent 258d07d3
......@@ -61,8 +61,8 @@ $token = external_generate_token_for_current_user($service);
$privatetoken = $token->privatetoken;
// Invalidate the private token if external_generate_token_for_current_user did not create a new token.
if ($token->timecreated < $timenow) {
// Don't return the private token if the user didn't just log in and a new token wasn't created.
if (empty($SESSION->justloggedin) and $token->timecreated < $timenow) {
$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