MDL-43119 Add valid until dates for tokens created by login/token.php

3 months were decided
This commit is contained in:
Juan Leyva
2014-05-07 16:16:40 +08:00
committed by Damyon Wiese
parent b04bf988ef
commit 679e323aaa
+2
View File
@@ -160,6 +160,8 @@ if (!empty($user)) {
$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(