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:
dc3852a
)
MDL-56737 externallib: Fetch token after inserting
author
Andrew Nicols
<andrew@nicols.co.uk>
Tue, 8 Nov 2016 04:45:57 +0000
(12:45 +0800)
committer
Andrew Nicols
<andrew@nicols.co.uk>
Tue, 8 Nov 2016 04:45:57 +0000
(12:45 +0800)
lib/externallib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/externallib.php
b/lib/externallib.php
index
9257f82
..
3eaee4f
100644
(file)
--- a/
lib/externallib.php
+++ b/
lib/externallib.php
@@
-1057,6
+1057,7
@@
function external_generate_token_for_current_user($service) {
// Generate the private token, it must be transmitted only via https.
$token->privatetoken = random_string(64);
$token->id = $DB->insert_record('external_tokens', $token);
+ $token = $DB->get_record('external_tokens', ['id' => $token->id]);
$params = array(
'objectid' => $token->id,