Welcome Guest, Not a member yet? Register   Sign In
Files management module
#11

@MGatner, thanks a lot for your reply. I do have an authentication system and user_id is set in my userdata session, but Files doesn't recognize it. I'm not in front of my machine today, but I will take a closer look on how to implement it as soon as possible and will report the outcome.
Reply
#12

@Nacho you need to have a function named user_id(), not just a session key. See https://codeigniter4.github.io/userguide...ation.html
Reply
#13

(This post was last modified: 12-21-2022, 04:24 AM by SergeTkach.)

(12-29-2020, 05:45 AM)MGatner Wrote: @Nacho you need to have a function named user_id(), not just a session key. See https://codeigniter4.github.io/userguide...ation.html


But I have Myth/Auth and have this error:

Missing dependency: authentication function user_id()

FCPATH\vendor\tatter\files\src\Controllers\Files.php at line 81

----
When I add auth helper there appear new error:

Code:
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
    {
        parent::initController($request, $response, $logger);
        
            helper('auth');

        if (! function_exists('user_id') || ! empty($this->config->failNoAuth))
        {
            throw new FilesException(lang('Files.noAuth'));
        }
    }

New error:

Call to undefined method App\Models\UserModel::groups

SYSTEMPATH\Model.php at line 773

Finally I have created mrthod groups() in app/Models/UserModel.php of Myth/Auth

But now there are some problems with styles
[Image: KyDwVxX]
https://ibb.co/KyDwVxX

-----
P.S.
There are some problems with installation. But it is about CI 4 spark...

php spark migrate -all

Warning: chdir(): No such file or directory (errno 2) in spark on line 44

Code:
// Path to the front controller
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR);

// Ensure the current directory is pointing to the front controller's directory
chdir(FCPATH);

But I placed all in public directory... And there in spark not defined this variant


----
P.P.S
Actually I have installed new project with public directory but nothing not appear in public/assets/vendor/*
Reply




Theme © iAndrew 2016 - Forum software by © MyBB