Replace BaseObject class with DI::* calls

This commit is contained in:
nupplaPhil 2019-12-15 23:28:01 +01:00
parent 1de3f186d7
commit 388b963714
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
98 changed files with 321 additions and 440 deletions

View file

@ -42,10 +42,7 @@ class Recovery extends BaseModule
Session::set('2fa', true);
notice(L10n::t('Remaining recovery codes: %d', RecoveryCode::countValidForUser(local_user())));
// Resume normal login workflow
/** @var Authentication $authentication */
$authentication = self::getClass(Authentication::class);
$authentication->setForUser($a, $a->user, true, true);
DI::auth()->setForUser($a, $a->user, true, true);
} else {
notice(L10n::t('Invalid code, please retry.'));
}

View file

@ -40,9 +40,7 @@ class Verify extends BaseModule
Session::set('2fa', $code);
// Resume normal login workflow
/** @var Authentication $authentication */
$authentication = self::getClass(Authentication::class);
$authentication->setForUser($a, $a->user, true, true);
DI::auth()->setForUser($a, $a->user, true, true);
} else {
self::$errors[] = L10n::t('Invalid code, please retry.');
}