Skip to content
Snippets Groups Projects
Commit 8868a90b authored by Thomas Hackl's avatar Thomas Hackl
Browse files

set user_id manually if token is given

parent 385e7078
No related branches found
No related tags found
No related merge requests found
...@@ -63,6 +63,8 @@ class MatrixAccount extends SimpleORMap ...@@ -63,6 +63,8 @@ class MatrixAccount extends SimpleORMap
// Access token specified, use this (and skip login because the token can be used directly). // Access token specified, use this (and skip login because the token can be used directly).
if (trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_ACCESS_TOKEN) != '') { if (trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_ACCESS_TOKEN) != '') {
$account = new Patrix\Account(trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_USERNAME), ''); $account = new Patrix\Account(trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_USERNAME), '');
$account->setUserId(
'@' . Config::get()->MATRIX_SYSTEM_ACCOUNT_USERNAME . ':' . MATRIX_ACCOUNTS_LOCAL_PART);
$account->setAccessData(trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_ACCESS_TOKEN), 'Stud.IP'); $account->setAccessData(trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_ACCESS_TOKEN), 'Stud.IP');
// No token, login by username and password. // No token, login by username and password.
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment