Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b04bf98
)
MDL-43119 Add valid until dates for tokens created by login/token.php
author
Juan Leyva
<juanleyvadelgado@gmail.com>
Wed, 7 May 2014 07:49:28 +0000
(15:49 +0800)
committer
Damyon Wiese
<damyon@moodle.com>
Wed, 7 May 2014 08:16:40 +0000
(16:16 +0800)
3 months were decided
login/token.php
patch
|
blob
|
blame
|
history
diff --git
a/login/token.php
b/login/token.php
index
919b97c
..
19a9eae
100644
(file)
--- a/
login/token.php
+++ b/
login/token.php
@@
-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(