mirror of
https://github.com/friendica/friendica
synced 2025-04-23 14:30:11 +00:00
UserSession class [5] - Refactor src/Module/ files with DI
This commit is contained in:
parent
a729f3255d
commit
eecc456e0c
78 changed files with 455 additions and 530 deletions
|
@ -24,7 +24,6 @@ namespace Friendica\Module;
|
|||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPException;
|
||||
|
||||
|
@ -50,7 +49,7 @@ abstract class BaseAdmin extends BaseModule
|
|||
*/
|
||||
public static function checkAdminAccess(bool $interactive = false)
|
||||
{
|
||||
if (!Session::getLocalUser()) {
|
||||
if (!DI::userSession()->getLocalUserId()) {
|
||||
if ($interactive) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Please login to continue.'));
|
||||
DI::session()->set('return_path', DI::args()->getQueryString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue