mirror of
https://github.com/nextcloud/integration_moodle.git
synced 2025-12-17 21:02:05 +01:00
avoid crash when no privatetoken on authentication
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
parent
330baee5be
commit
6467d48f3e
1 changed files with 1 additions and 1 deletions
|
|
@ -87,7 +87,7 @@ class MoodleAPIController extends Controller {
|
|||
if (!isset($result['error'])) {
|
||||
// we save the client ID and secret and give the client ID back to the UI
|
||||
$this->config->setUserValue($this->userId, Application::APP_ID, 'token', $result['token']);
|
||||
$this->config->setUserValue($this->userId, Application::APP_ID, 'privatetoken', $result['privatetoken']);
|
||||
$this->config->setUserValue($this->userId, Application::APP_ID, 'privatetoken', $result['privatetoken'] ?? '');
|
||||
// get user info
|
||||
$chosenName = $login;
|
||||
$params = [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue