Open ducit1995 opened 5 years ago
I also have the same problem
Same situation here. I am trying to setup the private folders for each user however I can never get the current Auth::user it always returns null. Is there another way to get the current user in middleware or the config file?
I also have the same problem
Same situation here. I am trying to setup the private folders for each user however I can never get the current Auth::user it always returns null. Is there another way to get the current user in middleware or the config file?
now i did fix it by sesssion :D
I also have the same problem
Same situation here. I am trying to setup the private folders for each user however I can never get the current Auth::user it always returns null. Is there another way to get the current user in middleware or the config file?
now i did fix it by sesssion :D
Can you explain a bit more how you are using the session to solve this? When I try to call the session in my middleware it shows up empty as well. Thanks
I also have the same problem
Same situation here. I am trying to setup the private folders for each user however I can never get the current Auth::user it always returns null. Is there another way to get the current user in middleware or the config file?
now i did fix it by sesssion :D
Can you explain a bit more how you are using the session to solve this? When I try to call the session in my middleware it shows up empty as well. Thanks
1 . when login i set seesion for this user
if (Auth::attempt(['email' => $email, 'password' => $password, 'role' => $role_admin)) { session_start(); $_SESSION["is_login"] = true; }
2 . in file config.php of ckfinder i replace old code to .
$config['authentication'] = function () { session_start(); if (!empty($_SESSION["is_login"])) { return true; } else { return false; } };
i did try custom Middleware with Auth of laravel but Auth always return null .
if (\Auth::check()) { config(['ckfinder.authentication' => function () use ($request) { return true; }]); } else config(['ckfinder.authentication' => function () use ($request) { return false; }]); }