mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-56737 externallib: Fetch token after inserting
This commit is contained in:
parent
dc3852ae1e
commit
11361f35be
1 changed files with 1 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue