mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-56737 externallib: Fetch token after inserting
This commit is contained in:
parent
dc3852ae1e
commit
11361f35be
@ -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…
x
Reference in New Issue
Block a user