Skip to content

Commit

Permalink
MDL-43119 Add valid until dates for tokens created by login/token.php
Browse files Browse the repository at this point in the history
3 months were decided
  • Loading branch information
jleyva authored and Damyon Wiese committed May 7, 2014
1 parent 568514e commit 14c16a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions login/token.php
Expand Up @@ -160,6 +160,8 @@
$token->creatorid = $user->id; $token->creatorid = $user->id;
$token->timecreated = time(); $token->timecreated = time();
$token->externalserviceid = $service_record->id; $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); $token->id = $DB->insert_record('external_tokens', $token);


$params = array( $params = array(
Expand Down

0 comments on commit 14c16a4

Please sign in to comment.