Browse files

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

3 months were decided
  • Loading branch information...
1 parent 568514e commit 14c16a416373f68c36b65f4653c0bd076eb0b290 @jleyva jleyva committed with damyon May 7, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 login/token.php
View
2 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(

0 comments on commit 14c16a4

Please sign in to comment.