Skip to content

Commit

Permalink
MDL-56905 tool_mobile: Return private tokens just after log-in
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyva committed Nov 11, 2016
1 parent 258d07d commit 5222cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/tool/mobile/launch.php
Expand Up @@ -61,8 +61,8 @@
$privatetoken = $token->privatetoken;
external_log_token_request($token);

// 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;
}

Expand Down

0 comments on commit 5222cb1

Please sign in to comment.