diff --git a/login/token.php b/login/token.php index 919b97c610d8c..19a9eaecc8f6c 100644 --- a/login/token.php +++ b/login/token.php @@ -160,6 +160,8 @@ $token->creatorid = $user->id; $token->timecreated = time(); $token->externalserviceid = $service_record->id; + // MDL-43119 Token valid for 3 months (12 weeks). + $token->validuntil = $token->timecreated + 12 * WEEKSECS; $token->id = $DB->insert_record('external_tokens', $token); $params = array(