Welcome Guest, Not a member yet? Register   Sign In
Files management module
#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


Messages In This Thread
Files management module - by MGatner - 10-21-2020, 06:53 PM
RE: Files management module - by {e}aksquad - 10-22-2020, 05:21 AM
RE: Files management module - by denis303 - 10-22-2020, 01:59 PM
RE: Files management module - by MGatner - 10-22-2020, 03:01 PM
RE: Files management module - by nc03061981 - 10-24-2020, 04:55 PM
RE: Files management module - by opassley - 11-23-2020, 02:42 AM
RE: Files management module - by MGatner - 11-25-2020, 05:45 AM
RE: Files management module - by Nacho - 12-18-2020, 07:55 PM
RE: Files management module - by luispastendev - 12-21-2020, 09:33 AM
RE: Files management module - by MGatner - 12-23-2020, 05:52 AM
RE: Files management module - by Nacho - 12-23-2020, 09:18 AM
RE: Files management module - by MGatner - 12-29-2020, 05:45 AM
RE: Files management module - by SergeTkach - 12-21-2022, 03:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB