mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-16 21:17:45 +02:00
refactor: add modules folder to phpstan paths + fix errors
This commit is contained in:
parent
7a6d9df6db
commit
bb628f355f
166 changed files with 452 additions and 526 deletions
|
|
@ -6,8 +6,9 @@ namespace Modules\Auth\Config;
|
|||
|
||||
use CodeIgniter\Shield\Authentication\Actions\ActionInterface;
|
||||
use CodeIgniter\Shield\Authentication\Actions\Email2FA;
|
||||
use CodeIgniter\Shield\Authentication\AuthenticatorInterface;
|
||||
use CodeIgniter\Shield\Config\Auth as ShieldAuth;
|
||||
use Modules\Admin\Config\Admin;
|
||||
use CodeIgniter\Shield\Entities\User;
|
||||
use Modules\Auth\Models\UserModel;
|
||||
|
||||
class Auth extends ShieldAuth
|
||||
|
|
@ -123,7 +124,7 @@ class Auth extends ShieldAuth
|
|||
{
|
||||
parent::__construct();
|
||||
|
||||
$adminGateway = config(Admin::class)
|
||||
$adminGateway = config('Admin')
|
||||
->gateway;
|
||||
|
||||
$this->redirects = [
|
||||
|
|
@ -155,14 +156,16 @@ class Auth extends ShieldAuth
|
|||
|
||||
// activate user upon magic-link login as it is done via email
|
||||
if (! auth()->user()->active) {
|
||||
/** @var Session $authenticator */
|
||||
/** @var AuthenticatorInterface $authenticator */
|
||||
$authenticator = auth('session')
|
||||
->getAuthenticator();
|
||||
|
||||
$user = $authenticator->getUser();
|
||||
|
||||
// Set the user active now
|
||||
$user->activate();
|
||||
if ($user instanceof User) {
|
||||
// Set the user active now
|
||||
$user->activate();
|
||||
}
|
||||
}
|
||||
|
||||
// prompt user to change their password
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue